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
62c4fd53
Commit
62c4fd53
authored
Oct 22, 2008
by
Peter Eastman
Browse files
Renamed "atoms" to "particles"
parent
ad75a390
Changes
48
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
186 additions
and
201 deletions
+186
-201
olla/include/kernels.h
olla/include/kernels.h
+2
-2
openmmapi/include/CMMotionRemover.h
openmmapi/include/CMMotionRemover.h
+1
-1
openmmapi/include/Force.h
openmmapi/include/Force.h
+3
-3
openmmapi/include/GBSAOBCForceField.h
openmmapi/include/GBSAOBCForceField.h
+21
-21
openmmapi/include/HarmonicAngleForce.h
openmmapi/include/HarmonicAngleForce.h
+11
-11
openmmapi/include/HarmonicBondForce.h
openmmapi/include/HarmonicBondForce.h
+9
-9
openmmapi/include/NonbondedForce.h
openmmapi/include/NonbondedForce.h
+33
-33
openmmapi/include/OpenMMContext.h
openmmapi/include/OpenMMContext.h
+9
-9
openmmapi/include/PeriodicTorsionForce.h
openmmapi/include/PeriodicTorsionForce.h
+13
-28
openmmapi/include/RBTorsionForce.h
openmmapi/include/RBTorsionForce.h
+13
-13
openmmapi/include/State.h
openmmapi/include/State.h
+4
-4
openmmapi/include/System.h
openmmapi/include/System.h
+36
-36
openmmapi/include/internal/AndersenThermostatImpl.h
openmmapi/include/internal/AndersenThermostatImpl.h
+1
-1
openmmapi/include/internal/CMMotionRemoverImpl.h
openmmapi/include/internal/CMMotionRemoverImpl.h
+1
-1
openmmapi/include/internal/ForceImpl.h
openmmapi/include/internal/ForceImpl.h
+1
-1
openmmapi/include/internal/NonbondedForceImpl.h
openmmapi/include/internal/NonbondedForceImpl.h
+1
-1
openmmapi/include/internal/OpenMMContextImpl.h
openmmapi/include/internal/OpenMMContextImpl.h
+3
-3
openmmapi/src/BrownianIntegrator.cpp
openmmapi/src/BrownianIntegrator.cpp
+7
-7
openmmapi/src/GBSAOBCForceField.cpp
openmmapi/src/GBSAOBCForceField.cpp
+9
-9
openmmapi/src/HarmonicAngleForce.cpp
openmmapi/src/HarmonicAngleForce.cpp
+8
-8
No files found.
olla/include/kernels.h
View file @
62c4fd53
...
@@ -200,7 +200,7 @@ public:
...
@@ -200,7 +200,7 @@ public:
*
*
* @param system the System this kernel will be applied to
* @param system the System this kernel will be applied to
* @param force the NonbondedForce this kernel will be used for
* @param force the NonbondedForce this kernel will be used for
* @param exclusions the i'th element lists the indices of all
atom
s with which the i'th
atom
should not interact through
* @param exclusions the i'th element lists the indices of all
particle
s with which the i'th
particle
should not interact through
* nonbonded forces. Bonded 1-4 pairs are also included in this list, since they should be omitted from
* nonbonded forces. Bonded 1-4 pairs are also included in this list, since they should be omitted from
* the standard nonbonded calculation.
* the standard nonbonded calculation.
*/
*/
...
@@ -331,7 +331,7 @@ public:
...
@@ -331,7 +331,7 @@ public:
};
};
/**
/**
* This kernel is invoked by AndersenThermostat at the start of each time step to adjust the
atom
velocities.
* This kernel is invoked by AndersenThermostat at the start of each time step to adjust the
particle
velocities.
*/
*/
class
ApplyAndersenThermostatKernel
:
public
KernelImpl
{
class
ApplyAndersenThermostatKernel
:
public
KernelImpl
{
public:
public:
...
...
openmmapi/include/CMMotionRemover.h
View file @
62c4fd53
...
@@ -40,7 +40,7 @@ namespace OpenMM {
...
@@ -40,7 +40,7 @@ namespace OpenMM {
/**
/**
* This class prevents the center of mass of a System from drifting. At each time step, it calculates the
* This class prevents the center of mass of a System from drifting. At each time step, it calculates the
* center of mass momentum, then adjusts the individual
atom
velocities to make it zero.
* center of mass momentum, then adjusts the individual
particle
velocities to make it zero.
*/
*/
class
OPENMM_EXPORT
CMMotionRemover
:
public
Force
{
class
OPENMM_EXPORT
CMMotionRemover
:
public
Force
{
...
...
openmmapi/include/Force.h
View file @
62c4fd53
...
@@ -39,15 +39,15 @@ namespace OpenMM {
...
@@ -39,15 +39,15 @@ namespace OpenMM {
class
ForceImpl
;
class
ForceImpl
;
/**
/**
* Force objects apply forces to the
atom
s in a System, or alter their behavior in other
* Force objects apply forces to the
particle
s in a System, or alter their behavior in other
* ways. This is an abstract class. Subclasses define particular forces.
* ways. This is an abstract class. Subclasses define particular forces.
*
*
* More specifically, a Force object can do any or all of the following:
* More specifically, a Force object can do any or all of the following:
*
*
* <ul>
* <ul>
* <li>Add a contribution to the force on each
atom
</li>
* <li>Add a contribution to the force on each
particle
</li>
* <li>Add a contribution to the potential energy of the System</li>
* <li>Add a contribution to the potential energy of the System</li>
* <li>Modify the positions and velocities of
atom
s at the start of each time step</li>
* <li>Modify the positions and velocities of
particle
s at the start of each time step</li>
* <li>Define parameters which are stored in the OpenMMContext and can be modified by the user</li>
* <li>Define parameters which are stored in the OpenMMContext and can be modified by the user</li>
* <li>Change the values of parameters defined by other Force objects at the start of each time step</li>
* <li>Change the values of parameters defined by other Force objects at the start of each time step</li>
* </ul>
* </ul>
...
...
openmmapi/include/GBSAOBCForceField.h
View file @
62c4fd53
...
@@ -47,33 +47,33 @@ public:
...
@@ -47,33 +47,33 @@ public:
/*
/*
* Create a GBSAOBCForceField.
* Create a GBSAOBCForceField.
*
*
* @param num
Atom
s the number of
atom
s in the system
* @param num
Particle
s the number of
particle
s in the system
*/
*/
GBSAOBCForceField
(
int
num
Atom
s
);
GBSAOBCForceField
(
int
num
Particle
s
);
/**
/**
* Get the number of
atom
s in the system.
* Get the number of
particle
s in the system.
*/
*/
int
getNum
Atom
s
()
const
{
int
getNum
Particle
s
()
const
{
return
atom
s
.
size
();
return
particle
s
.
size
();
}
}
/**
/**
* Get the force field parameters for a
n atom
.
* Get the force field parameters for a
particle
.
*
*
* @param index the index of the
atom
for which to get parameters
* @param index the index of the
particle
for which to get parameters
* @param charge the charge of the
atom
, measured in units of the proton charge
* @param charge the charge of the
particle
, measured in units of the proton charge
* @param radius the GBSA radius of the
atom
, measured in nm
* @param radius the GBSA radius of the
particle
, measured in nm
* @param scalingFactor the OBC scaling factor for the
atom
* @param scalingFactor the OBC scaling factor for the
particle
*/
*/
void
get
Atom
Parameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
scalingFactor
)
const
;
void
get
Particle
Parameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
scalingFactor
)
const
;
/**
/**
* Set the force field parameters for a
n atom
.
* Set the force field parameters for a
particle
.
*
*
* @param index the index of the
atom
for which to set parameters
* @param index the index of the
particle
for which to set parameters
* @param charge the charge of the
atom
, measured in units of the proton charge
* @param charge the charge of the
particle
, measured in units of the proton charge
* @param radius the GBSA radius of the
atom
, measured in nm
* @param radius the GBSA radius of the
particle
, measured in nm
* @param scalingFactor the OBC scaling factor for the
atom
* @param scalingFactor the OBC scaling factor for the
particle
*/
*/
void
set
Atom
Parameters
(
int
index
,
double
charge
,
double
radius
,
double
scalingFactor
);
void
set
Particle
Parameters
(
int
index
,
double
charge
,
double
radius
,
double
scalingFactor
);
/**
/**
* Get the dielectric constant for the solvent.
* Get the dielectric constant for the solvent.
*/
*/
...
@@ -101,7 +101,7 @@ public:
...
@@ -101,7 +101,7 @@ public:
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
();
private:
private:
class
Atom
Info
;
class
Particle
Info
;
double
solventDielectric
,
soluteDielectric
;
double
solventDielectric
,
soluteDielectric
;
// Retarded visual studio compiler complains about being unable to
// Retarded visual studio compiler complains about being unable to
...
@@ -112,7 +112,7 @@ private:
...
@@ -112,7 +112,7 @@ private:
#pragma warning(disable:4251)
#pragma warning(disable:4251)
#endif
#endif
std
::
vector
<
AtomInfo
>
atom
s
;
std
::
vector
<
ParticleInfo
>
particle
s
;
#if defined(_MSC_VER)
#if defined(_MSC_VER)
#pragma warning(pop)
#pragma warning(pop)
...
@@ -120,10 +120,10 @@ private:
...
@@ -120,10 +120,10 @@ private:
};
};
class
GBSAOBCForceField
::
Atom
Info
{
class
GBSAOBCForceField
::
Particle
Info
{
public:
public:
double
charge
,
radius
,
scalingFactor
;
double
charge
,
radius
,
scalingFactor
;
Atom
Info
()
{
Particle
Info
()
{
charge
=
radius
=
scalingFactor
=
0.0
;
charge
=
radius
=
scalingFactor
=
0.0
;
}
}
};
};
...
...
openmmapi/include/HarmonicAngleForce.h
View file @
62c4fd53
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
namespace
OpenMM
{
namespace
OpenMM
{
/**
/**
* This class implements an interaction between groups of three
atom
s that varies harmonically with the angle
* This class implements an interaction between groups of three
particle
s that varies harmonically with the angle
* between them. When creating a HarmonicAngleForce, you specify the number of angle as an argument to the
* between them. When creating a HarmonicAngleForce, you specify the number of angle as an argument to the
* constructor, then loop over them and call setAngleParameters() to set the force field parameters for each one.
* constructor, then loop over them and call setAngleParameters() to set the force field parameters for each one.
*/
*/
...
@@ -64,24 +64,24 @@ public:
...
@@ -64,24 +64,24 @@ public:
* Get the force field parameters for an angle term.
* Get the force field parameters for an angle term.
*
*
* @param index the index of the angle for which to get parameters
* @param index the index of the angle for which to get parameters
* @param
atom1
the index of the first
atom
forming the angle
* @param
particle1
the index of the first
particle
forming the angle
* @param
atom2
the index of the second
atom
forming the angle
* @param
particle2
the index of the second
particle
forming the angle
* @param
atom3
the index of the third
atom
forming the angle
* @param
particle3
the index of the third
particle
forming the angle
* @param length the equilibrium angle, measured in radians
* @param length the equilibrium angle, measured in radians
* @param k the harmonic force constant for the angle
* @param k the harmonic force constant for the angle
*/
*/
void
getAngleParameters
(
int
index
,
int
&
atom1
,
int
&
atom2
,
int
&
atom
3
,
double
&
angle
,
double
&
k
)
const
;
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle
3
,
double
&
angle
,
double
&
k
)
const
;
/**
/**
* Set the force field parameters for an angle term.
* Set the force field parameters for an angle term.
*
*
* @param index the index of the angle for which to set parameters
* @param index the index of the angle for which to set parameters
* @param
atom1
the index of the first
atom
forming the angle
* @param
particle1
the index of the first
particle
forming the angle
* @param
atom2
the index of the second
atom
forming the angle
* @param
particle2
the index of the second
particle
forming the angle
* @param
atom3
the index of the third
atom
forming the angle
* @param
particle3
the index of the third
particle
forming the angle
* @param length the equilibrium angle, measured in radians
* @param length the equilibrium angle, measured in radians
* @param k the harmonic force constant for the angle
* @param k the harmonic force constant for the angle
*/
*/
void
setAngleParameters
(
int
index
,
int
atom1
,
int
atom2
,
int
atom
3
,
double
angle
,
double
k
);
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle
3
,
double
angle
,
double
k
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
();
private:
private:
...
@@ -103,10 +103,10 @@ private:
...
@@ -103,10 +103,10 @@ private:
class
HarmonicAngleForce
::
AngleInfo
{
class
HarmonicAngleForce
::
AngleInfo
{
public:
public:
int
atom1
,
atom2
,
atom
3
;
int
particle1
,
particle2
,
particle
3
;
double
angle
,
k
;
double
angle
,
k
;
AngleInfo
()
{
AngleInfo
()
{
atom1
=
atom2
=
atom
3
=
-
1
;
particle1
=
particle2
=
particle
3
=
-
1
;
angle
=
k
=
0.0
;
angle
=
k
=
0.0
;
}
}
};
};
...
...
openmmapi/include/HarmonicBondForce.h
View file @
62c4fd53
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
namespace
OpenMM
{
namespace
OpenMM
{
/**
/**
* This class implements an interaction between pairs of
atom
s that varies harmonically with the distance
* This class implements an interaction between pairs of
particle
s that varies harmonically with the distance
* between them. When creating a HarmonicBondForce, you specify the number of bonds as an argument to the
* between them. When creating a HarmonicBondForce, you specify the number of bonds as an argument to the
* constructor, then loop over them and call setBondParameters() to set the force field parameters for each one.
* constructor, then loop over them and call setBondParameters() to set the force field parameters for each one.
*/
*/
...
@@ -64,22 +64,22 @@ public:
...
@@ -64,22 +64,22 @@ public:
* Get the force field parameters for a bond term.
* Get the force field parameters for a bond term.
*
*
* @param index the index of the bond for which to get parameters
* @param index the index of the bond for which to get parameters
* @param
atom1
the index of the first
atom
connected by the bond
* @param
particle1
the index of the first
particle
connected by the bond
* @param
atom2
the index of the second
atom
connected by the bond
* @param
particle2
the index of the second
particle
connected by the bond
* @param length the equilibrium length of the bond, measured in nm
* @param length the equilibrium length of the bond, measured in nm
* @param k the harmonic force constant for the bond
* @param k the harmonic force constant for the bond
*/
*/
void
getBondParameters
(
int
index
,
int
&
atom1
,
int
&
atom
2
,
double
&
length
,
double
&
k
)
const
;
void
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle
2
,
double
&
length
,
double
&
k
)
const
;
/**
/**
* Set the force field parameters for a bond term.
* Set the force field parameters for a bond term.
*
*
* @param index the index of the bond for which to set parameters
* @param index the index of the bond for which to set parameters
* @param
atom1
the index of the first
atom
connected by the bond
* @param
particle1
the index of the first
particle
connected by the bond
* @param
atom2
the index of the second
atom
connected by the bond
* @param
particle2
the index of the second
particle
connected by the bond
* @param length the equilibrium length of the bond, measured in nm
* @param length the equilibrium length of the bond, measured in nm
* @param k the harmonic force constant for the bond
* @param k the harmonic force constant for the bond
*/
*/
void
setBondParameters
(
int
index
,
int
atom1
,
int
atom
2
,
double
length
,
double
k
);
void
setBondParameters
(
int
index
,
int
particle1
,
int
particle
2
,
double
length
,
double
k
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
();
private:
private:
...
@@ -101,10 +101,10 @@ private:
...
@@ -101,10 +101,10 @@ private:
class
HarmonicBondForce
::
BondInfo
{
class
HarmonicBondForce
::
BondInfo
{
public:
public:
int
atom1
,
atom
2
;
int
particle1
,
particle
2
;
double
length
,
k
;
double
length
,
k
;
BondInfo
()
{
BondInfo
()
{
atom1
=
atom
2
=
-
1
;
particle1
=
particle
2
=
-
1
;
length
=
k
=
0.0
;
length
=
k
=
0.0
;
}
}
};
};
...
...
openmmapi/include/NonbondedForce.h
View file @
62c4fd53
...
@@ -51,8 +51,8 @@ namespace OpenMM {
...
@@ -51,8 +51,8 @@ namespace OpenMM {
* for those separated by three bonds (known as "1-4 interactions"). This class lets you provide a list of
* for those separated by three bonds (known as "1-4 interactions"). This class lets you provide a list of
* 1-4 interactions to include in the potential, along with the parameters to use for each one.
* 1-4 interactions to include in the potential, along with the parameters to use for each one.
*
*
* When creating a NonbondedForce, you specify the number of
atom
s and the number of 1-4 interactions as
* When creating a NonbondedForce, you specify the number of
particle
s and the number of 1-4 interactions as
* arguments to the constructor. You then loop over them and call set
Atom
Parameters() for each
atom
and
* arguments to the constructor. You then loop over them and call set
Particle
Parameters() for each
particle
and
* setNonbond14Parameters() for each 1-4 interaction.
* setNonbond14Parameters() for each 1-4 interaction.
*/
*/
...
@@ -73,8 +73,8 @@ public:
...
@@ -73,8 +73,8 @@ public:
*/
*/
CutoffNonPeriodic
=
1
,
CutoffNonPeriodic
=
1
,
/**
/**
* Periodic boundary conditions are used, so that each
atom
interacts only with the nearest periodic copy of
* Periodic boundary conditions are used, so that each
particle
interacts only with the nearest periodic copy of
* each other
atom
. Interactions beyond the cutoff distance are ignored. Coulomb interactions closer than the
* each other
particle
. Interactions beyond the cutoff distance are ignored. Coulomb interactions closer than the
* cutoff distance are modified using the reaction field method.
* cutoff distance are modified using the reaction field method.
*/
*/
CutoffPeriodic
=
2
CutoffPeriodic
=
2
...
@@ -82,15 +82,15 @@ public:
...
@@ -82,15 +82,15 @@ public:
/**
/**
* Create a NonbondedForce.
* Create a NonbondedForce.
*
*
* @param num
Atom
s the number of
atom
s in the system
* @param num
Particle
s the number of
particle
s in the system
* @param numNonbonded14 the number of nonbonded 1-4 terms in the potential function
* @param numNonbonded14 the number of nonbonded 1-4 terms in the potential function
*/
*/
NonbondedForce
(
int
num
Atom
s
,
int
numNonbonded14
);
NonbondedForce
(
int
num
Particle
s
,
int
numNonbonded14
);
/**
/**
* Get the number of
atom
s in the system.
* Get the number of
particle
s in the system.
*/
*/
int
getNum
Atom
s
()
const
{
int
getNum
Particle
s
()
const
{
return
atom
s
.
size
();
return
particle
s
.
size
();
}
}
/**
/**
* Get the number of nonbonded 1-4 terms in the potential function
* Get the number of nonbonded 1-4 terms in the potential function
...
@@ -141,49 +141,49 @@ public:
...
@@ -141,49 +141,49 @@ public:
*/
*/
void
setPeriodicBoxVectors
(
Vec3
a
,
Vec3
b
,
Vec3
c
);
void
setPeriodicBoxVectors
(
Vec3
a
,
Vec3
b
,
Vec3
c
);
/**
/**
* Get the nonbonded force parameters for a
n atom
.
* Get the nonbonded force parameters for a
particle
.
*
*
* @param index the index of the
atom
for which to get parameters
* @param index the index of the
particle
for which to get parameters
* @param charge the charge of the
atom
, measured in units of the proton charge
* @param charge the charge of the
particle
, measured in units of the proton charge
* @param radius the van der Waals radius of the
atom
, measured in nm
* @param radius the van der Waals radius of the
particle
, measured in nm
* @param depth the well depth of the van der Waals interaction, measured in kJ/mol
* @param depth the well depth of the van der Waals interaction, measured in kJ/mol
*/
*/
void
get
Atom
Parameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
depth
)
const
;
void
get
Particle
Parameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
depth
)
const
;
/**
/**
* Set the nonbonded force parameters for a
n atom
.
* Set the nonbonded force parameters for a
particle
.
*
*
* @param index the index of the
atom
for which to set parameters
* @param index the index of the
particle
for which to set parameters
* @param charge the charge of the
atom
, measured in units of the proton charge
* @param charge the charge of the
particle
, measured in units of the proton charge
* @param radius the van der Waals radius of the
atom
(sigma in the Lennard Jones potential), measured in nm
* @param radius the van der Waals radius of the
particle
(sigma in the Lennard Jones potential), measured in nm
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
*/
*/
void
set
Atom
Parameters
(
int
index
,
double
charge
,
double
radius
,
double
depth
);
void
set
Particle
Parameters
(
int
index
,
double
charge
,
double
radius
,
double
depth
);
/**
/**
* Get the force field parameters for a nonbonded 1-4 term.
* Get the force field parameters for a nonbonded 1-4 term.
*
*
* @param index the index of the interaction for which to get parameters
* @param index the index of the interaction for which to get parameters
* @param
atom1
the index of the first
atom
involved in the interaction
* @param
particle1
the index of the first
particle
involved in the interaction
* @param
atom2
the index of the second
atom
involved in the interaction
* @param
particle2
the index of the second
particle
involved in the interaction
* @param charge the scaled product of the atomic charges (i.e. the strength of the Coulomb interaction), measured in units of the proton charge
* @param charge the scaled product of the atomic charges (i.e. the strength of the Coulomb interaction), measured in units of the proton charge
* @param radius the van der Waals radius of the
atom
(sigma in the Lennard Jones potential), measured in nm
* @param radius the van der Waals radius of the
particle
(sigma in the Lennard Jones potential), measured in nm
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
*/
*/
void
getNonbonded14Parameters
(
int
index
,
int
&
atom1
,
int
&
atom
2
,
double
&
charge
,
double
&
radius
,
double
&
depth
)
const
;
void
getNonbonded14Parameters
(
int
index
,
int
&
particle1
,
int
&
particle
2
,
double
&
charge
,
double
&
radius
,
double
&
depth
)
const
;
/**
/**
* Set the force field parameters for a nonbonded 1-4 term.
* Set the force field parameters for a nonbonded 1-4 term.
*
*
* @param index the index of the interaction for which to get parameters
* @param index the index of the interaction for which to get parameters
* @param
atom1
the index of the first
atom
involved in the interaction
* @param
particle1
the index of the first
particle
involved in the interaction
* @param
atom2
the index of the second
atom
involved in the interaction
* @param
particle2
the index of the second
particle
involved in the interaction
* @param charge the scaled product of the atomic charges (i.e. the strength of the Coulomb interaction), measured in units of the proton charge
* @param charge the scaled product of the atomic charges (i.e. the strength of the Coulomb interaction), measured in units of the proton charge
* @param radius the van der Waals radius of the
atom
(sigma in the Lennard Jones potential), measured in nm
* @param radius the van der Waals radius of the
particle
(sigma in the Lennard Jones potential), measured in nm
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
*/
*/
void
setNonbonded14Parameters
(
int
index
,
int
atom1
,
int
atom
2
,
double
charge
,
double
radius
,
double
depth
);
void
setNonbonded14Parameters
(
int
index
,
int
particle1
,
int
particle
2
,
double
charge
,
double
radius
,
double
depth
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
();
private:
private:
class
Atom
Info
;
class
Particle
Info
;
class
NB14Info
;
class
NB14Info
;
NonbondedMethod
nonbondedMethod
;
NonbondedMethod
nonbondedMethod
;
double
cutoffDistance
;
double
cutoffDistance
;
...
@@ -196,7 +196,7 @@ private:
...
@@ -196,7 +196,7 @@ private:
#pragma warning(push)
#pragma warning(push)
#pragma warning(disable:4251)
#pragma warning(disable:4251)
#endif
#endif
std
::
vector
<
AtomInfo
>
atom
s
;
std
::
vector
<
ParticleInfo
>
particle
s
;
std
::
vector
<
NB14Info
>
nb14s
;
std
::
vector
<
NB14Info
>
nb14s
;
#if defined(_MSC_VER)
#if defined(_MSC_VER)
#pragma warning(pop)
#pragma warning(pop)
...
@@ -204,20 +204,20 @@ private:
...
@@ -204,20 +204,20 @@ private:
};
};
class
NonbondedForce
::
Atom
Info
{
class
NonbondedForce
::
Particle
Info
{
public:
public:
double
charge
,
radius
,
depth
;
double
charge
,
radius
,
depth
;
Atom
Info
()
{
Particle
Info
()
{
charge
=
radius
=
depth
=
0.0
;
charge
=
radius
=
depth
=
0.0
;
}
}
};
};
class
NonbondedForce
::
NB14Info
{
class
NonbondedForce
::
NB14Info
{
public:
public:
int
atom1
,
atom
2
;
int
particle1
,
particle
2
;
double
charge
,
radius
,
depth
;
double
charge
,
radius
,
depth
;
NB14Info
()
{
NB14Info
()
{
atom1
=
atom
2
=
-
1
;
particle1
=
particle
2
=
-
1
;
charge
=
radius
=
depth
=
0.0
;
charge
=
radius
=
depth
=
0.0
;
}
}
};
};
...
...
openmmapi/include/OpenMMContext.h
View file @
62c4fd53
...
@@ -50,15 +50,15 @@ class Platform;
...
@@ -50,15 +50,15 @@ class Platform;
*
*
* <ul>
* <ul>
* <li>The current time</li>
* <li>The current time</li>
* <li>The position of each
atom
</li>
* <li>The position of each
particle
</li>
* <li>The velocity of each
atom
</li>
* <li>The velocity of each
particle
</li>
* <li>The values of configurable parameters defined by Force objects in the System</li>
* <li>The values of configurable parameters defined by Force objects in the System</li>
* </ul>
* </ul>
*
*
* You can retrieve a snapshot of the current state at any time by calling getState(). This
* You can retrieve a snapshot of the current state at any time by calling getState(). This
* allows you to record the state of the simulation at various points, either for analysis
* allows you to record the state of the simulation at various points, either for analysis
* or for checkpointing. getState() can also be used to retrieve the current forces on each
* or for checkpointing. getState() can also be used to retrieve the current forces on each
*
atom
and the current energy of the System.
*
particle
and the current energy of the System.
*/
*/
class
OPENMM_EXPORT
OpenMMContext
{
class
OPENMM_EXPORT
OpenMMContext
{
...
@@ -112,17 +112,17 @@ public:
...
@@ -112,17 +112,17 @@ public:
*/
*/
void
setTime
(
double
time
);
void
setTime
(
double
time
);
/**
/**
* Set the positions of all
atom
s in the System (measured in nm).
* Set the positions of all
particle
s in the System (measured in nm).
*
*
* @param a vector whose length equals the number of
atom
s in the System. The i'th element
* @param
positions
a vector whose length equals the number of
particle
s in the System. The i'th element
* contains the position of the i'th
atom
.
* contains the position of the i'th
particle
.
*/
*/
void
setPositions
(
const
std
::
vector
<
Vec3
>&
positions
);
void
setPositions
(
const
std
::
vector
<
Vec3
>&
positions
);
/**
/**
* Set the velocities of all
atom
s in the System (measured in nm/picosecond).
* Set the velocities of all
particle
s in the System (measured in nm/picosecond).
*
*
* @param a vector whose length equals the number of
atom
s in the System. The i'th element
* @param
velocities
a vector whose length equals the number of
particle
s in the System. The i'th element
* contains the velocity of the i'th
atom
.
* contains the velocity of the i'th
particle
.
*/
*/
void
setVelocities
(
const
std
::
vector
<
Vec3
>&
velocities
);
void
setVelocities
(
const
std
::
vector
<
Vec3
>&
velocities
);
/**
/**
...
...
openmmapi/include/PeriodicTorsionForce.h
View file @
62c4fd53
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
namespace
OpenMM
{
namespace
OpenMM
{
/**
/**
* This class implements an interaction between groups of four
atom
s that varies periodically with the torsion angle
* This class implements an interaction between groups of four
particle
s that varies periodically with the torsion angle
* between them. When creating a PeriodicTorsionForce, you specify the number of torsions as an argument to the
* between them. When creating a PeriodicTorsionForce, you specify the number of torsions as an argument to the
* constructor, then loop over them and call setTorsionParameters() to set the force field parameters for each one.
* constructor, then loop over them and call setTorsionParameters() to set the force field parameters for each one.
*/
*/
...
@@ -64,43 +64,28 @@ public:
...
@@ -64,43 +64,28 @@ public:
* Get the force field parameters for a periodic torsion term.
* Get the force field parameters for a periodic torsion term.
*
*
* @param index the index of the torsion for which to get parameters
* @param index the index of the torsion for which to get parameters
* @param
atom1
the index of the first
atom
forming the torsion
* @param
particle1
the index of the first
particle
forming the torsion
* @param
atom2
the index of the second
atom
forming the torsion
* @param
particle2
the index of the second
particle
forming the torsion
* @param
atom3
the index of the third
atom
forming the torsion
* @param
particle3
the index of the third
particle
forming the torsion
* @param
atom3
the index of the fourth
atom
forming the torsion
* @param
particle3
the index of the fourth
particle
forming the torsion
* @param periodicity the periodicity of the torsion
* @param periodicity the periodicity of the torsion
* @param phase the phase offset of the torsion, measured in radians
* @param phase the phase offset of the torsion, measured in radians
* @param k the force constant for the torsion
* @param k the force constant for the torsion
*/
*/
void
getTorsionParameters
(
int
index
,
int
&
atom1
,
int
&
atom2
,
int
&
atom3
,
int
&
atom
4
,
int
&
periodicity
,
double
&
phase
,
double
&
k
)
const
;
void
getTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle
4
,
int
&
periodicity
,
double
&
phase
,
double
&
k
)
const
;
/**
/**
* Set the force field parameters for a periodic torsion term.
* Set the force field parameters for a periodic torsion term.
*
*
* @param index the index of the torsion for which to set parameters
* @param index the index of the torsion for which to set parameters
* @param
atom1
the index of the first
atom
forming the torsion
* @param
particle1
the index of the first
particle
forming the torsion
* @param
atom2
the index of the second
atom
forming the torsion
* @param
particle2
the index of the second
particle
forming the torsion
* @param
atom3
the index of the third
atom
forming the torsion
* @param
particle3
the index of the third
particle
forming the torsion
* @param
atom3
the index of the fourth
atom
forming the torsion
* @param
particle3
the index of the fourth
particle
forming the torsion
* @param periodicity the periodicity of the torsion
* @param periodicity the periodicity of the torsion
* @param phase the phase offset of the torsion, measured in radians
* @param phase the phase offset of the torsion, measured in radians
* @param k the force constant for the torsion
* @param k the force constant for the torsion
*/
*/
void
setTorsionParameters
(
int
index
,
int
atom1
,
int
atom2
,
int
atom3
,
int
atom4
,
int
periodicity
,
double
phase
,
double
k
);
void
setTorsionParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
periodicity
,
double
phase
,
double
k
);
/**
* Get the force field parameters for a Ryckaert-Bellemans torsion term.
*
* @param index the index of the torsion for which to get parameters
* @param atom1 the index of the first atom forming the torsion
* @param atom2 the index of the second atom forming the torsion
* @param atom3 the index of the third atom forming the torsion
* @param atom3 the index of the fourth atom forming the torsion
* @param c0 the coefficient of the constant term
* @param c1 the coefficient of the 1st order term
* @param c2 the coefficient of the 2nd order term
* @param c3 the coefficient of the 3rd order term
* @param c4 the coefficient of the 4th order term
* @param c5 the coefficient of the 5th order term
*/
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
();
private:
private:
...
@@ -122,10 +107,10 @@ private:
...
@@ -122,10 +107,10 @@ private:
class
PeriodicTorsionForce
::
PeriodicTorsionInfo
{
class
PeriodicTorsionForce
::
PeriodicTorsionInfo
{
public:
public:
int
atom1
,
atom2
,
atom3
,
atom
4
,
periodicity
;
int
particle1
,
particle2
,
particle3
,
particle
4
,
periodicity
;
double
phase
,
k
;
double
phase
,
k
;
PeriodicTorsionInfo
()
{
PeriodicTorsionInfo
()
{
atom1
=
atom2
=
atom3
=
atom
4
=
-
1
;
particle1
=
particle2
=
particle3
=
particle
4
=
-
1
;
periodicity
=
1
;
periodicity
=
1
;
phase
=
k
=
0.0
;
phase
=
k
=
0.0
;
}
}
...
...
openmmapi/include/RBTorsionForce.h
View file @
62c4fd53
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
namespace
OpenMM
{
namespace
OpenMM
{
/**
/**
* This class implements an interaction between groups of four
atom
s that varies with the torsion angle between them
* This class implements an interaction between groups of four
particle
s that varies with the torsion angle between them
* according to the Ryckaert-Bellemans potential. When creating an RBTorsionForce, you specify the number of torsions
* according to the Ryckaert-Bellemans potential. When creating an RBTorsionForce, you specify the number of torsions
* as an argument to the constructor, then loop over them and call setTorsionParameters() to set the force field
* as an argument to the constructor, then loop over them and call setTorsionParameters() to set the force field
* parameters for each one.
* parameters for each one.
...
@@ -65,10 +65,10 @@ public:
...
@@ -65,10 +65,10 @@ public:
* Get the force field parameters for a Ryckaert-Bellemans torsion term.
* Get the force field parameters for a Ryckaert-Bellemans torsion term.
*
*
* @param index the index of the torsion for which to get parameters
* @param index the index of the torsion for which to get parameters
* @param
atom1
the index of the first
atom
forming the torsion
* @param
particle1
the index of the first
particle
forming the torsion
* @param
atom2
the index of the second
atom
forming the torsion
* @param
particle2
the index of the second
particle
forming the torsion
* @param
atom3
the index of the third
atom
forming the torsion
* @param
particle3
the index of the third
particle
forming the torsion
* @param
atom3
the index of the fourth
atom
forming the torsion
* @param
particle3
the index of the fourth
particle
forming the torsion
* @param c0 the coefficient of the constant term
* @param c0 the coefficient of the constant term
* @param c1 the coefficient of the 1st order term
* @param c1 the coefficient of the 1st order term
* @param c2 the coefficient of the 2nd order term
* @param c2 the coefficient of the 2nd order term
...
@@ -76,15 +76,15 @@ public:
...
@@ -76,15 +76,15 @@ public:
* @param c4 the coefficient of the 4th order term
* @param c4 the coefficient of the 4th order term
* @param c5 the coefficient of the 5th order term
* @param c5 the coefficient of the 5th order term
*/
*/
void
getTorsionParameters
(
int
index
,
int
&
atom1
,
int
&
atom2
,
int
&
atom3
,
int
&
atom
4
,
double
&
c0
,
double
&
c1
,
double
&
c2
,
double
&
c3
,
double
&
c4
,
double
&
c5
)
const
;
void
getTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle
4
,
double
&
c0
,
double
&
c1
,
double
&
c2
,
double
&
c3
,
double
&
c4
,
double
&
c5
)
const
;
/**
/**
* Set the force field parameters for a Ryckaert-Bellemans torsion term.
* Set the force field parameters for a Ryckaert-Bellemans torsion term.
*
*
* @param index the index of the torsion for which to set parameters
* @param index the index of the torsion for which to set parameters
* @param
atom1
the index of the first
atom
forming the torsion
* @param
particle1
the index of the first
particle
forming the torsion
* @param
atom2
the index of the second
atom
forming the torsion
* @param
particle2
the index of the second
particle
forming the torsion
* @param
atom3
the index of the third
atom
forming the torsion
* @param
particle3
the index of the third
particle
forming the torsion
* @param
atom3
the index of the fourth
atom
forming the torsion
* @param
particle3
the index of the fourth
particle
forming the torsion
* @param c0 the coefficient of the constant term
* @param c0 the coefficient of the constant term
* @param c1 the coefficient of the 1st order term
* @param c1 the coefficient of the 1st order term
* @param c2 the coefficient of the 2nd order term
* @param c2 the coefficient of the 2nd order term
...
@@ -92,7 +92,7 @@ public:
...
@@ -92,7 +92,7 @@ public:
* @param c4 the coefficient of the 4th order term
* @param c4 the coefficient of the 4th order term
* @param c5 the coefficient of the 5th order term
* @param c5 the coefficient of the 5th order term
*/
*/
void
setTorsionParameters
(
int
index
,
int
atom1
,
int
atom2
,
int
atom3
,
int
atom
4
,
double
c0
,
double
c1
,
double
c2
,
double
c3
,
double
c4
,
double
c5
);
void
setTorsionParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle
4
,
double
c0
,
double
c1
,
double
c2
,
double
c3
,
double
c4
,
double
c5
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
();
private:
private:
...
@@ -114,10 +114,10 @@ private:
...
@@ -114,10 +114,10 @@ private:
class
RBTorsionForce
::
RBTorsionInfo
{
class
RBTorsionForce
::
RBTorsionInfo
{
public:
public:
int
atom1
,
atom2
,
atom3
,
atom
4
;
int
particle1
,
particle2
,
particle3
,
particle
4
;
double
c
[
6
];
double
c
[
6
];
RBTorsionInfo
()
{
RBTorsionInfo
()
{
atom1
=
atom2
=
atom3
=
atom
4
=
-
1
;
particle1
=
particle2
=
particle3
=
particle
4
=
-
1
;
c
[
0
]
=
c
[
1
]
=
c
[
2
]
=
c
[
3
]
=
c
[
4
]
=
c
[
5
]
=
0.0
;
c
[
0
]
=
c
[
1
]
=
c
[
2
]
=
c
[
3
]
=
c
[
4
]
=
c
[
5
]
=
0.0
;
}
}
};
};
...
...
openmmapi/include/State.h
View file @
62c4fd53
...
@@ -62,15 +62,15 @@ public:
...
@@ -62,15 +62,15 @@ public:
*/
*/
double
getTime
()
const
;
double
getTime
()
const
;
/**
/**
* Get the position of each
atom
. If this State does not contain positions, this will throw an exception.
* Get the position of each
particle
. If this State does not contain positions, this will throw an exception.
*/
*/
const
std
::
vector
<
Vec3
>&
getPositions
()
const
;
const
std
::
vector
<
Vec3
>&
getPositions
()
const
;
/**
/**
* Get the velocity of each
atom
. If this State does not contain velocities, this will throw an exception.
* Get the velocity of each
particle
. If this State does not contain velocities, this will throw an exception.
*/
*/
const
std
::
vector
<
Vec3
>&
getVelocities
()
const
;
const
std
::
vector
<
Vec3
>&
getVelocities
()
const
;
/**
/**
* Get the force acting on each
atom
. If this State does not contain forces, this will throw an exception.
* Get the force acting on each
particle
. If this State does not contain forces, this will throw an exception.
*/
*/
const
std
::
vector
<
Vec3
>&
getForces
()
const
;
const
std
::
vector
<
Vec3
>&
getForces
()
const
;
/**
/**
...
@@ -87,7 +87,7 @@ public:
...
@@ -87,7 +87,7 @@ public:
const
std
::
map
<
std
::
string
,
double
>&
getParameters
()
const
;
const
std
::
map
<
std
::
string
,
double
>&
getParameters
()
const
;
private:
private:
friend
class
OpenMMContext
;
friend
class
OpenMMContext
;
State
(
double
time
,
int
num
Atom
s
,
DataType
types
);
State
(
double
time
,
int
num
Particle
s
,
DataType
types
);
// Retarded visual studio compiler complains about being unable to
// Retarded visual studio compiler complains about being unable to
// export private stl class members.
// export private stl class members.
...
...
openmmapi/include/System.h
View file @
62c4fd53
...
@@ -44,14 +44,14 @@ class OPENMM_EXPORT Force;
...
@@ -44,14 +44,14 @@ class OPENMM_EXPORT Force;
* three elements:
* three elements:
*
*
* <ol>
* <ol>
* <li>The set of
atom
s in the system</li>
* <li>The set of
particle
s in the system</li>
* <li>The forces acting on them</li>
* <li>The forces acting on them</li>
* <li>Pairs of
atom
s whose separation should be connstrained to a fixed value</li>
* <li>Pairs of
particle
s whose separation should be connstrained to a fixed value</li>
* </ol>
* </ol>
*
*
* The
atom
s and constraints are defined directly by the System object.
* The
particle
s and constraints are defined directly by the System object.
* The forces are defined by objects that extend the Force class. The System
* The forces are defined by objects that extend the Force class. The System
* stores a list of Force objects that determine the motion of the
atom
s.
* stores a list of Force objects that determine the motion of the
particle
s.
*/
*/
class
OPENMM_EXPORT
System
{
class
OPENMM_EXPORT
System
{
...
@@ -59,32 +59,32 @@ public:
...
@@ -59,32 +59,32 @@ public:
/**
/**
* Create a new System.
* Create a new System.
*
*
* @param num
Atoms
the number of
atom
s in the System
* @param num
Particles
the number of
particle
s in the System
* @param numConstraints the number of distance constraints in the System.
* @param numConstraints the number of distance constraints in the System.
*/
*/
System
(
int
num
Atom
s
,
int
numConstraints
);
System
(
int
num
Particle
s
,
int
numConstraints
);
~
System
();
~
System
();
/**
/**
* Get the number of
atom
s in this System.
* Get the number of
particle
s in this System.
*/
*/
int
getNum
Atom
s
()
const
{
int
getNum
Particle
s
()
const
{
return
masses
.
size
();
return
masses
.
size
();
}
}
/**
/**
* Get the mass (in atomic mass units) of a
n atom
.
* Get the mass (in atomic mass units) of a
particle
.
*
*
* @param index the index of the
atom
for which to get the mass
* @param index the index of the
particle
for which to get the mass
*/
*/
double
get
Atom
Mass
(
int
index
)
const
{
double
get
Particle
Mass
(
int
index
)
const
{
return
masses
[
index
];
return
masses
[
index
];
}
}
/**
/**
* Set the mass (in atomic mass units) of a
n atom
.
* Set the mass (in atomic mass units) of a
particle
.
*
*
* @param index the index of the
atom
for which to set the mass
* @param index the index of the
particle
for which to set the mass
* @param mass the mass of the
atom
* @param mass the mass of the
particle
*/
*/
void
set
Atom
Mass
(
int
index
,
double
mass
)
{
void
set
Particle
Mass
(
int
index
,
double
mass
)
{
masses
[
index
]
=
mass
;
masses
[
index
]
=
mass
;
}
}
/**
/**
...
@@ -97,20 +97,20 @@ public:
...
@@ -97,20 +97,20 @@ public:
* Get the parameters defining a distance constraint.
* Get the parameters defining a distance constraint.
*
*
* @param index the index of the constraint for which to get parameters
* @param index the index of the constraint for which to get parameters
* @param
atom1
the index of the first
atom
involved in the constraint
* @param
particle1
the index of the first
particle
involved in the constraint
* @param
atom2
the index of the second
atom
involved in the constraint
* @param
particle2
the index of the second
particle
involved in the constraint
* @param distance the required distance between the two
atom
s, measured in nm
* @param distance the required distance between the two
particle
s, measured in nm
*/
*/
void
getConstraintParameters
(
int
index
,
int
&
atom1
,
int
&
atom
2
,
double
&
distance
)
const
;
void
getConstraintParameters
(
int
index
,
int
&
particle1
,
int
&
particle
2
,
double
&
distance
)
const
;
/**
/**
* Set the parameters defining a distance constraint.
* Set the parameters defining a distance constraint.
*
*
* @param index the index of the constraint for which to set parameters
* @param index the index of the constraint for which to set parameters
* @param
atom1
the index of the first
atom
involved in the constraint
* @param
particle1
the index of the first
particle
involved in the constraint
* @param
atom2
the index of the second
atom
involved in the constraint
* @param
particle2
the index of the second
particle
involved in the constraint
* @param distance the required distance between the two
atom
s, measured in nm
* @param distance the required distance between the two
particle
s, measured in nm
*/
*/
void
setConstraintParameters
(
int
index
,
int
atom1
,
int
atom
2
,
double
distance
);
void
setConstraintParameters
(
int
index
,
int
particle1
,
int
particle
2
,
double
distance
);
/**
/**
* Add a Force to the System. The Force should have been created on the heap with the
* Add a Force to the System. The Force should have been created on the heap with the
* "new" operator. The System takes over ownership of it, and deletes the Force when the
* "new" operator. The System takes over ownership of it, and deletes the Force when the
...
@@ -156,10 +156,10 @@ private:
...
@@ -156,10 +156,10 @@ private:
class
System
::
ConstraintInfo
{
class
System
::
ConstraintInfo
{
public:
public:
int
atom1
,
atom
2
;
int
particle1
,
particle
2
;
double
distance
;
double
distance
;
ConstraintInfo
()
{
ConstraintInfo
()
{
atom1
=
atom
2
=
-
1
;
particle1
=
particle
2
=
-
1
;
distance
=
0.0
;
distance
=
0.0
;
}
}
};
};
...
...
openmmapi/include/internal/AndersenThermostatImpl.h
View file @
62c4fd53
...
@@ -52,7 +52,7 @@ public:
...
@@ -52,7 +52,7 @@ public:
}
}
void
updateContextState
(
OpenMMContextImpl
&
context
);
void
updateContextState
(
OpenMMContextImpl
&
context
);
void
calcForces
(
OpenMMContextImpl
&
context
,
Stream
&
forces
)
{
void
calcForces
(
OpenMMContextImpl
&
context
,
Stream
&
forces
)
{
// This force doesn't apply forces to
atom
s.
// This force doesn't apply forces to
particle
s.
}
}
double
calcEnergy
(
OpenMMContextImpl
&
context
)
{
double
calcEnergy
(
OpenMMContextImpl
&
context
)
{
return
0.0
;
// This force doesn't contribute to the potential energy.
return
0.0
;
// This force doesn't contribute to the potential energy.
...
...
openmmapi/include/internal/CMMotionRemoverImpl.h
View file @
62c4fd53
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
}
}
void
updateContextState
(
OpenMMContextImpl
&
context
);
void
updateContextState
(
OpenMMContextImpl
&
context
);
void
calcForces
(
OpenMMContextImpl
&
context
,
Stream
&
forces
)
{
void
calcForces
(
OpenMMContextImpl
&
context
,
Stream
&
forces
)
{
// This force doesn't apply forces to
atom
s.
// This force doesn't apply forces to
particle
s.
}
}
double
calcEnergy
(
OpenMMContextImpl
&
context
)
{
double
calcEnergy
(
OpenMMContextImpl
&
context
)
{
return
0.0
;
// This force doesn't contribute to the potential energy.
return
0.0
;
// This force doesn't contribute to the potential energy.
...
...
openmmapi/include/internal/ForceImpl.h
View file @
62c4fd53
...
@@ -74,7 +74,7 @@ public:
...
@@ -74,7 +74,7 @@ public:
*/
*/
virtual
void
updateContextState
(
OpenMMContextImpl
&
context
)
=
0
;
virtual
void
updateContextState
(
OpenMMContextImpl
&
context
)
=
0
;
/**
/**
* Calculate the force on each
atom
generated by this ForceImpl. The forces should be <i>added</i>
* Calculate the force on each
particle
generated by this ForceImpl. The forces should be <i>added</i>
* to the values already present in the array that is passed in. If this ForceImpl does not generate
* to the values already present in the array that is passed in. If this ForceImpl does not generate
* any new forces, it should simply return without modifying the array.
* any new forces, it should simply return without modifying the array.
*
*
...
...
openmmapi/include/internal/NonbondedForceImpl.h
View file @
62c4fd53
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
std
::
vector
<
std
::
string
>
getKernelNames
();
private:
private:
void
findExclusions
(
const
std
::
vector
<
std
::
vector
<
int
>
>&
bondIndices
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
set
<
std
::
pair
<
int
,
int
>
>&
bonded14Indices
)
const
;
void
findExclusions
(
const
std
::
vector
<
std
::
vector
<
int
>
>&
bondIndices
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
set
<
std
::
pair
<
int
,
int
>
>&
bonded14Indices
)
const
;
void
addExclusionsToSet
(
const
std
::
vector
<
std
::
set
<
int
>
>&
bonded12
,
std
::
set
<
int
>&
exclusions
,
int
base
Atom
,
int
from
Atom
,
int
currentLevel
)
const
;
void
addExclusionsToSet
(
const
std
::
vector
<
std
::
set
<
int
>
>&
bonded12
,
std
::
set
<
int
>&
exclusions
,
int
base
Particle
,
int
from
Particle
,
int
currentLevel
)
const
;
NonbondedForce
&
owner
;
NonbondedForce
&
owner
;
Kernel
kernel
;
Kernel
kernel
;
};
};
...
...
openmmapi/include/internal/OpenMMContextImpl.h
View file @
62c4fd53
...
@@ -81,19 +81,19 @@ public:
...
@@ -81,19 +81,19 @@ public:
return
*
platform
;
return
*
platform
;
}
}
/**
/**
* Get the Stream containing the current position of each
atom
.
* Get the Stream containing the current position of each
particle
.
*/
*/
Stream
&
getPositions
()
{
Stream
&
getPositions
()
{
return
positions
;
return
positions
;
}
}
/**
/**
* Get the Stream containing the current velocity of each
atom
.
* Get the Stream containing the current velocity of each
particle
.
*/
*/
Stream
&
getVelocities
()
{
Stream
&
getVelocities
()
{
return
velocities
;
return
velocities
;
}
}
/**
/**
* Get the Stream containing the force on each
atom
that was calculated by
* Get the Stream containing the force on each
particle
that was calculated by
* the most recent call to calcForces().
* the most recent call to calcForces().
*/
*/
Stream
&
getForces
()
{
Stream
&
getForces
()
{
...
...
openmmapi/src/BrownianIntegrator.cpp
View file @
62c4fd53
...
@@ -49,17 +49,17 @@ void BrownianIntegrator::initialize(OpenMMContextImpl& contextRef) {
...
@@ -49,17 +49,17 @@ void BrownianIntegrator::initialize(OpenMMContextImpl& contextRef) {
context
=
&
contextRef
;
context
=
&
contextRef
;
kernel
=
context
->
getPlatform
().
createKernel
(
IntegrateBrownianStepKernel
::
Name
(),
contextRef
);
kernel
=
context
->
getPlatform
().
createKernel
(
IntegrateBrownianStepKernel
::
Name
(),
contextRef
);
const
System
&
system
=
context
->
getSystem
();
const
System
&
system
=
context
->
getSystem
();
vector
<
double
>
masses
(
system
.
getNum
Atom
s
());
vector
<
double
>
masses
(
system
.
getNum
Particle
s
());
vector
<
std
::
vector
<
int
>
>
constraintIndices
(
system
.
getNumConstraints
());
vector
<
std
::
vector
<
int
>
>
constraintIndices
(
system
.
getNumConstraints
());
vector
<
double
>
constraintLengths
(
system
.
getNumConstraints
());
vector
<
double
>
constraintLengths
(
system
.
getNumConstraints
());
for
(
int
i
=
0
;
i
<
system
.
getNum
Atom
s
();
++
i
)
for
(
int
i
=
0
;
i
<
system
.
getNum
Particle
s
();
++
i
)
masses
[
i
]
=
system
.
get
Atom
Mass
(
i
);
masses
[
i
]
=
system
.
get
Particle
Mass
(
i
);
for
(
int
i
=
0
;
i
<
system
.
getNumConstraints
();
++
i
)
{
for
(
int
i
=
0
;
i
<
system
.
getNumConstraints
();
++
i
)
{
int
atom1
,
atom
2
;
int
particle1
,
particle
2
;
double
distance
;
double
distance
;
system
.
getConstraintParameters
(
i
,
atom1
,
atom
2
,
distance
);
system
.
getConstraintParameters
(
i
,
particle1
,
particle
2
,
distance
);
constraintIndices
[
i
].
push_back
(
atom
1
);
constraintIndices
[
i
].
push_back
(
particle
1
);
constraintIndices
[
i
].
push_back
(
atom
2
);
constraintIndices
[
i
].
push_back
(
particle
2
);
constraintLengths
[
i
]
=
distance
;
constraintLengths
[
i
]
=
distance
;
}
}
dynamic_cast
<
IntegrateBrownianStepKernel
&>
(
kernel
.
getImpl
()).
initialize
(
system
,
*
this
);
dynamic_cast
<
IntegrateBrownianStepKernel
&>
(
kernel
.
getImpl
()).
initialize
(
system
,
*
this
);
...
...
openmmapi/src/GBSAOBCForceField.cpp
View file @
62c4fd53
...
@@ -36,19 +36,19 @@
...
@@ -36,19 +36,19 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
GBSAOBCForceField
::
GBSAOBCForceField
(
int
num
Atoms
)
:
atoms
(
numAtom
s
),
solventDielectric
(
78.3
),
soluteDielectric
(
1.0
)
{
GBSAOBCForceField
::
GBSAOBCForceField
(
int
num
Particles
)
:
particles
(
numParticle
s
),
solventDielectric
(
78.3
),
soluteDielectric
(
1.0
)
{
}
}
void
GBSAOBCForceField
::
get
Atom
Parameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
scalingFactor
)
const
{
void
GBSAOBCForceField
::
get
Particle
Parameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
scalingFactor
)
const
{
charge
=
atom
s
[
index
].
charge
;
charge
=
particle
s
[
index
].
charge
;
radius
=
atom
s
[
index
].
radius
;
radius
=
particle
s
[
index
].
radius
;
scalingFactor
=
atom
s
[
index
].
scalingFactor
;
scalingFactor
=
particle
s
[
index
].
scalingFactor
;
}
}
void
GBSAOBCForceField
::
set
Atom
Parameters
(
int
index
,
double
charge
,
double
radius
,
double
scalingFactor
)
{
void
GBSAOBCForceField
::
set
Particle
Parameters
(
int
index
,
double
charge
,
double
radius
,
double
scalingFactor
)
{
atom
s
[
index
].
charge
=
charge
;
particle
s
[
index
].
charge
=
charge
;
atom
s
[
index
].
radius
=
radius
;
particle
s
[
index
].
radius
=
radius
;
atom
s
[
index
].
scalingFactor
=
scalingFactor
;
particle
s
[
index
].
scalingFactor
=
scalingFactor
;
}
}
ForceImpl
*
GBSAOBCForceField
::
createImpl
()
{
ForceImpl
*
GBSAOBCForceField
::
createImpl
()
{
...
...
openmmapi/src/HarmonicAngleForce.cpp
View file @
62c4fd53
...
@@ -39,18 +39,18 @@ using namespace OpenMM;
...
@@ -39,18 +39,18 @@ using namespace OpenMM;
HarmonicAngleForce
::
HarmonicAngleForce
(
int
numAngles
)
:
angles
(
numAngles
)
{
HarmonicAngleForce
::
HarmonicAngleForce
(
int
numAngles
)
:
angles
(
numAngles
)
{
}
}
void
HarmonicAngleForce
::
getAngleParameters
(
int
index
,
int
&
atom1
,
int
&
atom2
,
int
&
atom
3
,
double
&
angle
,
double
&
k
)
const
{
void
HarmonicAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle
3
,
double
&
angle
,
double
&
k
)
const
{
atom
1
=
angles
[
index
].
atom
1
;
particle
1
=
angles
[
index
].
particle
1
;
atom
2
=
angles
[
index
].
atom
2
;
particle
2
=
angles
[
index
].
particle
2
;
atom
3
=
angles
[
index
].
atom
3
;
particle
3
=
angles
[
index
].
particle
3
;
angle
=
angles
[
index
].
angle
;
angle
=
angles
[
index
].
angle
;
k
=
angles
[
index
].
k
;
k
=
angles
[
index
].
k
;
}
}
void
HarmonicAngleForce
::
setAngleParameters
(
int
index
,
int
atom1
,
int
atom2
,
int
atom
3
,
double
angle
,
double
k
)
{
void
HarmonicAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle
3
,
double
angle
,
double
k
)
{
angles
[
index
].
atom1
=
atom
1
;
angles
[
index
].
particle1
=
particle
1
;
angles
[
index
].
atom2
=
atom
2
;
angles
[
index
].
particle2
=
particle
2
;
angles
[
index
].
atom3
=
atom
3
;
angles
[
index
].
particle3
=
particle
3
;
angles
[
index
].
angle
=
angle
;
angles
[
index
].
angle
=
angle
;
angles
[
index
].
k
=
k
;
angles
[
index
].
k
=
k
;
}
}
...
...
Prev
1
2
3
Next
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