Commit 83e5bc34 authored by Michael Sherman's avatar Michael Sherman
Browse files

Modify Fortran examples to reflect signature changes.

parent 7616a965
...@@ -35,7 +35,7 @@ PROGRAM HelloArgon ...@@ -35,7 +35,7 @@ PROGRAM HelloArgon
! to recast the specific NonbondedForce to a general Force.) ! to recast the specific NonbondedForce to a general Force.)
call OpenMM_System_create(system) call OpenMM_System_create(system)
call OpenMM_NonbondedForce_create(nonbond) 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. ! Create three atoms.
call OpenMM_Vec3Array_create(initPosInNm, 3) call OpenMM_Vec3Array_create(initPosInNm, 3)
...@@ -43,7 +43,7 @@ PROGRAM HelloArgon ...@@ -43,7 +43,7 @@ PROGRAM HelloArgon
! Space the atoms out evenly by atom index. ! Space the atoms out evenly by atom index.
call OpenMM_Vec3Array_set(initPosInNm, a, (/ 0.5d0*(a-1), 0d0, 0d0 /)) 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) ! charge, L-J sigma (nm), well depth (kJ) (vdWRad(Ar)=.188 nm)
ix = OpenMM_NonbondedForce_addParticle(nonbond, 0d0, 0.3350d0, 0.996d0) ix = OpenMM_NonbondedForce_addParticle(nonbond, 0d0, 0.3350d0, 0.996d0)
......
...@@ -202,8 +202,8 @@ SUBROUTINE myInitializeOpenMM(ommHandle, platformName) ...@@ -202,8 +202,8 @@ SUBROUTINE myInitializeOpenMM(ommHandle, platformName)
! Convert specific force types to generic OpenMM_Force so that we can ! Convert specific force types to generic OpenMM_Force so that we can
! add them to the OpenMM_System. ! add them to the OpenMM_System.
call OpenMM_System_addForce(system, transfer(nonbond, OpenMM_Force(null()))) ix = 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(gbsa, OpenMM_Force(null())))
! Specify dielectrics for GBSA implicit solvation. ! Specify dielectrics for GBSA implicit solvation.
call OpenMM_GBSAOBCForce_setSolventDielectric(gbsa, SolventDielectric) call OpenMM_GBSAOBCForce_setSolventDielectric(gbsa, SolventDielectric)
...@@ -224,7 +224,7 @@ SUBROUTINE myInitializeOpenMM(ommHandle, platformName) ...@@ -224,7 +224,7 @@ SUBROUTINE myInitializeOpenMM(ommHandle, platformName)
* OpenMM_SigmaPerVdwRadius, & * OpenMM_SigmaPerVdwRadius, &
atoms(n)%vdwEnergyInKcal * OpenMM_KJPerKcal) atoms(n)%vdwEnergyInKcal * OpenMM_KJPerKcal)
call OpenMM_GBSAOBCForce_addParticle(gbsa, & ix = OpenMM_GBSAOBCForce_addParticle(gbsa, &
atoms(n)%charge, & atoms(n)%charge, &
atoms(n)%gbsaRadiusInAng * OpenMM_NmPerAngstrom, & atoms(n)%gbsaRadiusInAng * OpenMM_NmPerAngstrom, &
atoms(n)%gbsaScaleFactor) atoms(n)%gbsaScaleFactor)
......
...@@ -1106,6 +1106,7 @@ void openmm_runtimeobjects_getintegrator_(OpenMM_RuntimeObjects* const& ommrt, O ...@@ -1106,6 +1106,7 @@ void openmm_runtimeobjects_getintegrator_(OpenMM_RuntimeObjects* const& ommrt, O
void OPENMM_RUNTIMEOBJECTS_GETINTEGRATOR(OpenMM_RuntimeObjects* const& ommrt, OpenMM_Integrator*& integ) void OPENMM_RUNTIMEOBJECTS_GETINTEGRATOR(OpenMM_RuntimeObjects* const& ommrt, OpenMM_Integrator*& integ)
{ integ = OpenMM_RuntimeObjects_getIntegrator(ommrt); } { integ = OpenMM_RuntimeObjects_getIntegrator(ommrt); }
// setContext
void OpenMM_RuntimeObjects_setContext(OpenMM_RuntimeObjects* ommrt, OpenMM_Context* context) void OpenMM_RuntimeObjects_setContext(OpenMM_RuntimeObjects* ommrt, OpenMM_Context* context)
{ OpenMM_Context_destroy(ommrt->context); ommrt->context = context; } { OpenMM_Context_destroy(ommrt->context); ommrt->context = context; }
void openmm_runtimeobjects_setcontext_(OpenMM_RuntimeObjects* const& ommrt, OpenMM_Context*& context) void openmm_runtimeobjects_setcontext_(OpenMM_RuntimeObjects* const& ommrt, OpenMM_Context*& context)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment