Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
83e5bc34
Commit
83e5bc34
authored
Jun 29, 2009
by
Michael Sherman
Browse files
Modify Fortran examples to reflect signature changes.
parent
7616a965
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
examples/HelloArgonInFortran.f90
examples/HelloArgonInFortran.f90
+2
-2
examples/HelloSodiumChlorideInFortran.f90
examples/HelloSodiumChlorideInFortran.f90
+3
-3
examples/OpenMM_CWrapper.cpp
examples/OpenMM_CWrapper.cpp
+1
-0
No files found.
examples/HelloArgonInFortran.f90
View file @
83e5bc34
...
...
@@ -35,7 +35,7 @@ PROGRAM HelloArgon
! to recast the specific NonbondedForce to a general Force.)
call
OpenMM_System_create
(
system
)
call
OpenMM_NonbondedForce_create
(
nonbond
)
call
OpenMM_System_addForce
(
system
,
transfer
(
nonbond
,
OpenMM_Force
(
null
())))
ix
=
OpenMM_System_addForce
(
system
,
transfer
(
nonbond
,
OpenMM_Force
(
null
())))
! Create three atoms.
call
OpenMM_Vec3Array_create
(
initPosInNm
,
3
)
...
...
@@ -43,7 +43,7 @@ PROGRAM HelloArgon
! Space the atoms out evenly by atom index.
call
OpenMM_Vec3Array_set
(
initPosInNm
,
a
,
(/
0.5d0
*
(
a
-1
),
0d0
,
0d0
/))
call
OpenMM_System_addParticle
(
system
,
39.95d0
)
!mass of Ar, grams/mole
ix
=
OpenMM_System_addParticle
(
system
,
39.95d0
)
!mass of Ar, grams/mole
! charge, L-J sigma (nm), well depth (kJ) (vdWRad(Ar)=.188 nm)
ix
=
OpenMM_NonbondedForce_addParticle
(
nonbond
,
0d0
,
0.3350d0
,
0.996d0
)
...
...
examples/HelloSodiumChlorideInFortran.f90
View file @
83e5bc34
...
...
@@ -202,8 +202,8 @@ SUBROUTINE myInitializeOpenMM(ommHandle, platformName)
! Convert specific force types to generic OpenMM_Force so that we can
! add them to the OpenMM_System.
call
OpenMM_System_addForce
(
system
,
transfer
(
nonbond
,
OpenMM_Force
(
null
())))
call
OpenMM_System_addForce
(
system
,
transfer
(
gbsa
,
OpenMM_Force
(
null
())))
ix
=
OpenMM_System_addForce
(
system
,
transfer
(
nonbond
,
OpenMM_Force
(
null
())))
ix
=
OpenMM_System_addForce
(
system
,
transfer
(
gbsa
,
OpenMM_Force
(
null
())))
! Specify dielectrics for GBSA implicit solvation.
call
OpenMM_GBSAOBCForce_setSolventDielectric
(
gbsa
,
SolventDielectric
)
...
...
@@ -224,7 +224,7 @@ SUBROUTINE myInitializeOpenMM(ommHandle, platformName)
*
OpenMM_SigmaPerVdwRadius
,
&
atoms
(
n
)
%
vdwEnergyInKcal
*
OpenMM_KJPerKcal
)
call
OpenMM_GBSAOBCForce_addParticle
(
gbsa
,
&
ix
=
OpenMM_GBSAOBCForce_addParticle
(
gbsa
,
&
atoms
(
n
)
%
charge
,
&
atoms
(
n
)
%
gbsaRadiusInAng
*
OpenMM_NmPerAngstrom
,
&
atoms
(
n
)
%
gbsaScaleFactor
)
...
...
examples/OpenMM_CWrapper.cpp
View file @
83e5bc34
...
...
@@ -1106,6 +1106,7 @@ void openmm_runtimeobjects_getintegrator_(OpenMM_RuntimeObjects* const& ommrt, O
void
OPENMM_RUNTIMEOBJECTS_GETINTEGRATOR
(
OpenMM_RuntimeObjects
*
const
&
ommrt
,
OpenMM_Integrator
*&
integ
)
{
integ
=
OpenMM_RuntimeObjects_getIntegrator
(
ommrt
);
}
// setContext
void
OpenMM_RuntimeObjects_setContext
(
OpenMM_RuntimeObjects
*
ommrt
,
OpenMM_Context
*
context
)
{
OpenMM_Context_destroy
(
ommrt
->
context
);
ommrt
->
context
=
context
;
}
void
openmm_runtimeobjects_setcontext_
(
OpenMM_RuntimeObjects
*
const
&
ommrt
,
OpenMM_Context
*&
context
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment