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
80cc954a
Commit
80cc954a
authored
Nov 12, 2015
by
peastman
Browse files
Merge pull request #1228 from rmcgibbo/docstrings
Better docstrings
parents
d137b536
1db3314e
Changes
63
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
507 additions
and
398 deletions
+507
-398
openmmapi/include/openmm/System.h
openmmapi/include/openmm/System.h
+17
-17
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
+9
-9
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
+11
-11
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
...openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
+4
-4
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
...amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
+9
-9
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
+39
-37
plugins/amoeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
...oeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
+6
-6
plugins/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
+8
-8
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
.../amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
+9
-9
plugins/amoeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
...oeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
+9
-9
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
+20
-20
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
...moeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
+3
-3
plugins/drude/openmmapi/include/openmm/DrudeForce.h
plugins/drude/openmmapi/include/openmm/DrudeForce.h
+21
-21
serialization/include/openmm/serialization/SerializationNode.h
...lization/include/openmm/serialization/SerializationNode.h
+1
-1
wrappers/python/filterPythonFiles.py
wrappers/python/filterPythonFiles.py
+52
-32
wrappers/python/simtk/openmm/amd.py
wrappers/python/simtk/openmm/amd.py
+83
-56
wrappers/python/simtk/openmm/app/amberinpcrdfile.py
wrappers/python/simtk/openmm/app/amberinpcrdfile.py
+25
-12
wrappers/python/simtk/openmm/app/amberprmtopfile.py
wrappers/python/simtk/openmm/app/amberprmtopfile.py
+46
-23
wrappers/python/simtk/openmm/app/charmmcrdfiles.py
wrappers/python/simtk/openmm/app/charmmcrdfiles.py
+38
-26
wrappers/python/simtk/openmm/app/charmmparameterset.py
wrappers/python/simtk/openmm/app/charmmparameterset.py
+97
-85
No files found.
openmmapi/include/openmm/System.h
View file @
80cc954a
...
@@ -153,9 +153,9 @@ public:
...
@@ -153,9 +153,9 @@ 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 particle1 the index of the first particle involved in the constraint
* @param
[out]
particle1 the index of the first particle involved in the constraint
* @param particle2 the index of the second particle involved in the constraint
* @param
[out]
particle2 the index of the second particle involved in the constraint
* @param distance the required distance between the two particles, measured in nm
* @param
[out]
distance the required distance between the two particles, measured in nm
*/
*/
void
getConstraintParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
distance
)
const
;
void
getConstraintParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
distance
)
const
;
/**
/**
...
@@ -216,9 +216,9 @@ public:
...
@@ -216,9 +216,9 @@ public:
* created Context will have its box vectors set to these. They will affect
* created Context will have its box vectors set to these. They will affect
* any Force added to the System that uses periodic boundary conditions.
* any Force added to the System that uses periodic boundary conditions.
*
*
* @param a
on exit, this contains
the vector defining the first edge of the periodic box
* @param
[out]
a the vector defining the first edge of the periodic box
* @param b
on exit, this contains
the vector defining the second edge of the periodic box
* @param
[out]
b the vector defining the second edge of the periodic box
* @param c
on exit, this contains
the vector defining the third edge of the periodic box
* @param
[out]
c the vector defining the third edge of the periodic box
*/
*/
void
getDefaultPeriodicBoxVectors
(
Vec3
&
a
,
Vec3
&
b
,
Vec3
&
c
)
const
;
void
getDefaultPeriodicBoxVectors
(
Vec3
&
a
,
Vec3
&
b
,
Vec3
&
c
)
const
;
/**
/**
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
View file @
80cc954a
...
@@ -128,7 +128,7 @@ public:
...
@@ -128,7 +128,7 @@ public:
* @param particle2 the index of the second particle connected by the angle
* @param particle2 the index of the second particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param length the equilibrium angle, measured in degrees
* @param length the equilibrium angle, measured in degrees
* @param quadratic
k
the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @param quadratic
K
the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @return the index of the angle that was added
* @return the index of the angle that was added
*/
*/
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
...
@@ -137,11 +137,11 @@ public:
...
@@ -137,11 +137,11 @@ 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 particle1 the index of the first particle connected by the angle
* @param
[out]
particle1 the index of the first particle connected by the angle
* @param particle2 the index of the second particle connected by the angle
* @param
[out]
particle2 the index of the second particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param
[out]
particle3 the index of the third particle connected by the angle
* @param length the equilibrium angle, measured in degrees
* @param
[out]
length the equilibrium angle, measured in degrees
* @param quadratic
k
the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @param
[out]
quadratic
K
the quadratic force constant for the angle, measured in kJ/mol/radian^2
*/
*/
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
length
,
double
&
quadraticK
)
const
;
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
length
,
double
&
quadraticK
)
const
;
...
@@ -153,7 +153,7 @@ public:
...
@@ -153,7 +153,7 @@ public:
* @param particle2 the index of the second particle connected by the angle
* @param particle2 the index of the second particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param length the equilibrium angle, measured in degrees
* @param length the equilibrium angle, measured in degrees
* @param quadratic
k
the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @param quadratic
K
the quadratic force constant for the angle, measured in kJ/mol/radian^2
*/
*/
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
/**
/**
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
View file @
80cc954a
...
@@ -100,7 +100,7 @@ public:
...
@@ -100,7 +100,7 @@ public:
* @param particle1 the index of the first particle connected by the bond
* @param particle1 the index of the first particle connected by the bond
* @param particle2 the index of the second particle 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 quadratic force constant for the bond
* @param
quadraticK
the quadratic force constant for the bond
* @return the index of the bond that was added
* @return the index of the bond that was added
*/
*/
...
@@ -110,10 +110,10 @@ public:
...
@@ -110,10 +110,10 @@ 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 particle1 the index of the first particle connected by the bond
* @param
[out]
particle1 the index of the first particle connected by the bond
* @param particle2 the index of the second particle connected by the bond
* @param
[out]
particle2 the index of the second particle connected by the bond
* @param length the equilibrium length of the bond, measured in nm
* @param
[out]
length the equilibrium length of the bond, measured in nm
* @param quadratic
k
the quadratic force constant for the bond
* @param
[out]
quadratic
K
the quadratic force constant for the bond
*/
*/
void
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
;
void
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
;
...
@@ -125,7 +125,7 @@ public:
...
@@ -125,7 +125,7 @@ public:
* @param particle1 the index of the first particle connected by the bond
* @param particle1 the index of the first particle connected by the bond
* @param particle2 the index of the second particle 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 quadratic force constant for the bond
* @param
quadraticK
the quadratic force constant for the bond
*/
*/
void
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
void
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
/**
/**
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
View file @
80cc954a
...
@@ -80,9 +80,9 @@ public:
...
@@ -80,9 +80,9 @@ public:
* Get the force field parameters for a particle.
* Get the force field parameters for a particle.
*
*
* @param index the index of the particle for which to get parameters
* @param index the index of the particle for which to get parameters
* @param charge the charge of the particle, measured in units of the proton charge
* @param
[out]
charge the charge of the particle, measured in units of the proton charge
* @param radius the atomic radius of the particle, measured in nm
* @param
[out]
radius the atomic radius of the particle, measured in nm
* @param scalingFactor the scaling factor for the particle
* @param
[out]
scalingFactor the scaling factor for the particle
*/
*/
void
getParticleParameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
scalingFactor
)
const
;
void
getParticleParameters
(
int
index
,
double
&
charge
,
double
&
radius
,
double
&
scalingFactor
)
const
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
View file @
80cc954a
...
@@ -129,7 +129,7 @@ public:
...
@@ -129,7 +129,7 @@ public:
* @param particle3 the index of the third particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param particle4 the index of the fourth particle connected by the angle
* @param particle4 the index of the fourth particle connected by the angle
* @param length the equilibrium angle, measured in radians
* @param length the equilibrium angle, measured in radians
* @param quadratic
k
the quadratic force constant for the angle measured in kJ/mol/radian^2
* @param quadratic
K
the quadratic force constant for the angle measured in kJ/mol/radian^2
* @return the index of the angle that was added
* @return the index of the angle that was added
*/
*/
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
...
@@ -139,12 +139,12 @@ public:
...
@@ -139,12 +139,12 @@ 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 particle1 the index of the first particle connected by the angle
* @param
[out]
particle1 the index of the first particle connected by the angle
* @param particle2 the index of the second particle connected by the angle
* @param
[out]
particle2 the index of the second particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param
[out]
particle3 the index of the third particle connected by the angle
* @param particle4 the index of the fourth particle connected by the angle
* @param
[out]
particle4 the index of the fourth particle connected by the angle
* @param length the equilibrium angle, measured in radians
* @param
[out]
length the equilibrium angle, measured in radians
* @param quadratic
k
the quadratic force constant for the angle measured in kJ/mol/radian^2
* @param
[out]
quadratic
K
the quadratic force constant for the angle measured in kJ/mol/radian^2
*/
*/
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
length
,
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
length
,
double
&
quadraticK
)
const
;
double
&
quadraticK
)
const
;
...
@@ -158,7 +158,7 @@ public:
...
@@ -158,7 +158,7 @@ public:
* @param particle3 the index of the third particle connected by the angle
* @param particle3 the index of the third particle connected by the angle
* @param particle4 the index of the fourth particle connected by the angle
* @param particle4 the index of the fourth particle connected by the angle
* @param length the equilibrium angle, measured in radians
* @param length the equilibrium angle, measured in radians
* @param quadratic
k
the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @param quadratic
K
the quadratic force constant for the angle, measured in kJ/mol/radian^2
*/
*/
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
);
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
);
/**
/**
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
View file @
80cc954a
...
@@ -148,7 +148,7 @@ public:
...
@@ -148,7 +148,7 @@ public:
* Set the Ewald alpha parameter. If this is 0 (the default), a value is chosen automatically
* Set the Ewald alpha parameter. If this is 0 (the default), a value is chosen automatically
* based on the Ewald error tolerance.
* based on the Ewald error tolerance.
*
*
* @param
E
wald alpha parameter
* @param
ae
wald alpha parameter
*/
*/
void
setAEwald
(
double
aewald
);
void
setAEwald
(
double
aewald
);
...
@@ -171,7 +171,7 @@ public:
...
@@ -171,7 +171,7 @@ public:
* Set the PME grid dimensions. If Ewald alpha is 0 (the default), this is ignored and grid dimensions
* Set the PME grid dimensions. If Ewald alpha is 0 (the default), this is ignored and grid dimensions
* are chosen automatically based on the Ewald error tolerance.
* are chosen automatically based on the Ewald error tolerance.
*
*
* @param the PME grid dimensions
* @param
gridDimension
the PME grid dimensions
*/
*/
void
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
);
void
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
);
...
@@ -182,10 +182,10 @@ public:
...
@@ -182,10 +182,10 @@ public:
* See the manual for details.
* See the manual for details.
*
*
* @param context the Context for which to get the parameters
* @param context the Context for which to get the parameters
* @param alpha the separation parameter
* @param
[out]
alpha the separation parameter
* @param nx the number of grid points along the X axis
* @param
[out]
nx the number of grid points along the X axis
* @param ny the number of grid points along the Y axis
* @param
[out]
ny the number of grid points along the Y axis
* @param nz the number of grid points along the Z axis
* @param
[out]
nz the number of grid points along the Z axis
*/
*/
void
getPMEParametersInContext
(
const
Context
&
context
,
double
&
alpha
,
int
&
nx
,
int
&
ny
,
int
&
nz
)
const
;
void
getPMEParametersInContext
(
const
Context
&
context
,
double
&
alpha
,
int
&
nx
,
int
&
ny
,
int
&
nz
)
const
;
...
@@ -212,16 +212,16 @@ public:
...
@@ -212,16 +212,16 @@ public:
* Get the multipole parameters for a particle.
* Get the multipole parameters for a particle.
*
*
* @param index the index of the atom for which to get parameters
* @param index the index of the atom for which to get parameters
* @param charge the particle's charge
* @param
[out]
charge the particle's charge
* @param molecularDipole the particle's molecular dipole (vector of size 3)
* @param
[out]
molecularDipole the particle's molecular dipole (vector of size 3)
* @param molecularQuadrupole the particle's molecular quadrupole (vector of size 9)
* @param
[out]
molecularQuadrupole the particle's molecular quadrupole (vector of size 9)
* @param axisType the particle's axis type
* @param
[out]
axisType the particle's axis type
* @param multipoleAtomZ index of first atom used in constructing lab<->molecular frames
* @param
[out]
multipoleAtomZ index of first atom used in constructing lab<->molecular frames
* @param multipoleAtomX index of second atom used in constructing lab<->molecular frames
* @param
[out]
multipoleAtomX index of second atom used in constructing lab<->molecular frames
* @param multipoleAtomY index of second atom used in constructing lab<->molecular frames
* @param
[out]
multipoleAtomY index of second atom used in constructing lab<->molecular frames
* @param thole Thole parameter
* @param
[out]
thole Thole parameter
* @param dampingFactor dampingFactor parameter
* @param
[out]
dampingFactor dampingFactor parameter
* @param polarity polarity parameter
* @param
[out]
polarity polarity parameter
*/
*/
void
getMultipoleParameters
(
int
index
,
double
&
charge
,
std
::
vector
<
double
>&
molecularDipole
,
std
::
vector
<
double
>&
molecularQuadrupole
,
void
getMultipoleParameters
(
int
index
,
double
&
charge
,
std
::
vector
<
double
>&
molecularDipole
,
std
::
vector
<
double
>&
molecularQuadrupole
,
int
&
axisType
,
int
&
multipoleAtomZ
,
int
&
multipoleAtomX
,
int
&
multipoleAtomY
,
double
&
thole
,
double
&
dampingFactor
,
double
&
polarity
)
const
;
int
&
axisType
,
int
&
multipoleAtomZ
,
int
&
multipoleAtomX
,
int
&
multipoleAtomY
,
double
&
thole
,
double
&
dampingFactor
,
double
&
polarity
)
const
;
...
@@ -237,6 +237,8 @@ public:
...
@@ -237,6 +237,8 @@ public:
* @param multipoleAtomZ index of first atom used in constructing lab<->molecular frames
* @param multipoleAtomZ index of first atom used in constructing lab<->molecular frames
* @param multipoleAtomX index of second atom used in constructing lab<->molecular frames
* @param multipoleAtomX index of second atom used in constructing lab<->molecular frames
* @param multipoleAtomY index of second atom used in constructing lab<->molecular frames
* @param multipoleAtomY index of second atom used in constructing lab<->molecular frames
* @param thole thole parameter
* @param dampingFactor damping factor parameter
* @param polarity polarity parameter
* @param polarity polarity parameter
*/
*/
void
setMultipoleParameters
(
int
index
,
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
void
setMultipoleParameters
(
int
index
,
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
...
@@ -256,7 +258,7 @@ public:
...
@@ -256,7 +258,7 @@ public:
*
*
* @param index the index of the atom for which to set parameters
* @param index the index of the atom for which to set parameters
* @param typeId CovalentTypes type
* @param typeId CovalentTypes type
* @param covalentAtoms
output vector of covalent atoms associated w/ the specfied CovalentType
* @param
[out]
covalentAtoms output vector of covalent atoms associated w/ the specfied CovalentType
*/
*/
void
getCovalentMap
(
int
index
,
CovalentType
typeId
,
std
::
vector
<
int
>&
covalentAtoms
)
const
;
void
getCovalentMap
(
int
index
,
CovalentType
typeId
,
std
::
vector
<
int
>&
covalentAtoms
)
const
;
...
@@ -264,7 +266,7 @@ public:
...
@@ -264,7 +266,7 @@ public:
* Get the CovalentMap for an atom
* Get the CovalentMap for an atom
*
*
* @param index the index of the atom for which to set parameters
* @param index the index of the atom for which to set parameters
* @param covalentLists
output vector of covalent lists of atoms
* @param
[out]
covalentLists output vector of covalent lists of atoms
*/
*/
void
getCovalentMaps
(
int
index
,
std
::
vector
<
std
::
vector
<
int
>
>&
covalentLists
)
const
;
void
getCovalentMaps
(
int
index
,
std
::
vector
<
std
::
vector
<
int
>
>&
covalentLists
)
const
;
...
@@ -278,7 +280,7 @@ public:
...
@@ -278,7 +280,7 @@ public:
/**
/**
* Set the max number of iterations to be used in calculating the mutual induced dipoles
* Set the max number of iterations to be used in calculating the mutual induced dipoles
*
*
* @param
max
number of iterations
* @param
inputMutualInducedMaxIterations
number of iterations
*/
*/
void
setMutualInducedMaxIterations
(
int
inputMutualInducedMaxIterations
);
void
setMutualInducedMaxIterations
(
int
inputMutualInducedMaxIterations
);
...
@@ -292,7 +294,7 @@ public:
...
@@ -292,7 +294,7 @@ public:
/**
/**
* Set the target epsilon to be used to test for convergence of iterative method used in calculating the mutual induced dipoles
* Set the target epsilon to be used to test for convergence of iterative method used in calculating the mutual induced dipoles
*
*
* @param target epsilon
* @param
inputMutualInducedTargetEpsilon
target epsilon
*/
*/
void
setMutualInducedTargetEpsilon
(
double
inputMutualInducedTargetEpsilon
);
void
setMutualInducedTargetEpsilon
(
double
inputMutualInducedTargetEpsilon
);
...
@@ -319,7 +321,7 @@ public:
...
@@ -319,7 +321,7 @@ public:
* Get the induced dipole moments of all particles.
* Get the induced dipole moments of all particles.
*
*
* @param context the Context for which to get the induced dipoles
* @param context the Context for which to get the induced dipoles
* @param dipoles the induced dipole moment of particle i is stored into the i'th element
* @param
[out]
dipoles the induced dipole moment of particle i is stored into the i'th element
*/
*/
void
getInducedDipoles
(
Context
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
void
getInducedDipoles
(
Context
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
...
@@ -328,7 +330,7 @@ public:
...
@@ -328,7 +330,7 @@ public:
*
*
* @param inputGrid input grid points over which the potential is to be evaluated
* @param inputGrid input grid points over which the potential is to be evaluated
* @param context context
* @param context context
* @param outputElectrostaticPotential output potential
* @param
[out]
outputElectrostaticPotential output potential
*/
*/
void
getElectrostaticPotential
(
const
std
::
vector
<
Vec3
>&
inputGrid
,
void
getElectrostaticPotential
(
const
std
::
vector
<
Vec3
>&
inputGrid
,
...
@@ -344,7 +346,7 @@ public:
...
@@ -344,7 +346,7 @@ public:
* the quadrupole moment is still undefined and should be ignored.
* the quadrupole moment is still undefined and should be ignored.
*
*
* @param context context
* @param context context
* @param outputMultipoleMoments (charge,
* @param
[out]
outputMultipoleMoments (charge,
dipole_x, dipole_y, dipole_z,
dipole_x, dipole_y, dipole_z,
quadrupole_xx, quadrupole_xy, quadrupole_xz,
quadrupole_xx, quadrupole_xy, quadrupole_xz,
quadrupole_yx, quadrupole_yy, quadrupole_yz,
quadrupole_yx, quadrupole_yy, quadrupole_yz,
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
View file @
80cc954a
...
@@ -134,11 +134,11 @@ public:
...
@@ -134,11 +134,11 @@ public:
* Get the force field parameters for an out-of-plane bend term.
* Get the force field parameters for an out-of-plane bend term.
*
*
* @param index the index of the outOfPlaneBend for which to get parameters
* @param index the index of the outOfPlaneBend for which to get parameters
* @param particle1 the index of the first particle connected by the outOfPlaneBend
* @param
[out]
particle1 the index of the first particle connected by the outOfPlaneBend
* @param particle2 the index of the second particle connected by the outOfPlaneBend
* @param
[out]
particle2 the index of the second particle connected by the outOfPlaneBend
* @param particle3 the index of the third particle connected by the outOfPlaneBend
* @param
[out]
particle3 the index of the third particle connected by the outOfPlaneBend
* @param particle4 the index of the fourth particle connected by the outOfPlaneBend
* @param
[out]
particle4 the index of the fourth particle connected by the outOfPlaneBend
* @param k the force constant for the out-of-plane bend
* @param
[out]
k the force constant for the out-of-plane bend
*/
*/
void
getOutOfPlaneBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
k
)
const
;
void
getOutOfPlaneBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
k
)
const
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
View file @
80cc954a
...
@@ -80,13 +80,13 @@ public:
...
@@ -80,13 +80,13 @@ public:
* Get the force field parameters for a torsion term.
* Get the force field parameters for a 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 particle1 the index of the first particle connected by the torsion
* @param
[out]
particle1 the index of the first particle connected by the torsion
* @param particle2 the index of the second particle connected by the torsion
* @param
[out]
particle2 the index of the second particle connected by the torsion
* @param particle3 the index of the third particle connected by the torsion
* @param
[out]
particle3 the index of the third particle connected by the torsion
* @param particle4 the index of the fourth particle connected by the torsion
* @param
[out]
particle4 the index of the fourth particle connected by the torsion
* @param particle5 the index of the fifth particle connected by the torsion
* @param
[out]
particle5 the index of the fifth particle connected by the torsion
* @param particle6 the index of the sixth particle connected by the torsion
* @param
[out]
particle6 the index of the sixth particle connected by the torsion
* @param k the force constant for the torsion
* @param
[out]
k the force constant for the torsion
*/
*/
void
getPiTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
int
&
particle5
,
int
&
particle6
,
double
&
k
)
const
;
void
getPiTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
int
&
particle5
,
int
&
particle6
,
double
&
k
)
const
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
View file @
80cc954a
...
@@ -82,14 +82,14 @@ public:
...
@@ -82,14 +82,14 @@ public:
* Get the force field parameters for a stretch-bend term.
* Get the force field parameters for a stretch-bend term.
*
*
* @param index the index of the stretch-bend for which to get parameters
* @param index the index of the stretch-bend for which to get parameters
* @param particle1 the index of the first particle connected by the stretch-bend
* @param
[out]
particle1 the index of the first particle connected by the stretch-bend
* @param particle2 the index of the second particle connected by the stretch-bend
* @param
[out]
particle2 the index of the second particle connected by the stretch-bend
* @param particle3 the index of the third particle connected by the stretch-bend
* @param
[out]
particle3 the index of the third particle connected by the stretch-bend
* @param lengthAB the equilibrium length of the stretch-bend in bond ab [particle1, particle2], measured in nm
* @param
[out]
lengthAB the equilibrium length of the stretch-bend in bond ab [particle1, particle2], measured in nm
* @param lengthCB the equilibrium length of the stretch-bend in bond cb [particle3, particle2], measured in nm
* @param
[out]
lengthCB the equilibrium length of the stretch-bend in bond cb [particle3, particle2], measured in nm
* @param angle the equilibrium angle in radians
* @param
[out]
angle the equilibrium angle in radians
* @param k1 the force constant of the product of bond ab and angle a-b-c
* @param
[out]
k1 the force constant of the product of bond ab and angle a-b-c
* @param k2 the force constant of the product of bond bc and angle a-b-c
* @param
[out]
k2 the force constant of the product of bond bc and angle a-b-c
*/
*/
void
getStretchBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
lengthAB
,
void
getStretchBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
lengthAB
,
double
&
lengthCB
,
double
&
angle
,
double
&
k1
,
double
&
k2
)
const
;
double
&
lengthCB
,
double
&
angle
,
double
&
k1
,
double
&
k2
)
const
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
View file @
80cc954a
...
@@ -90,13 +90,13 @@ public:
...
@@ -90,13 +90,13 @@ public:
* Get the force field parameters for a torsion-torsion term.
* Get the force field parameters for a torsion-torsion term.
*
*
* @param index the index of the torsion-torsion for which to get parameters
* @param index the index of the torsion-torsion for which to get parameters
* @param particle1 the index of the first particle connected by the torsion-torsion
* @param
[out]
particle1 the index of the first particle connected by the torsion-torsion
* @param particle2 the index of the second particle connected by the torsion-torsion
* @param
[out]
particle2 the index of the second particle connected by the torsion-torsion
* @param particle3 the index of the third particle connected by the torsion-torsion
* @param
[out]
particle3 the index of the third particle connected by the torsion-torsion
* @param particle4 the index of the fourth particle connected by the torsion-torsion
* @param
[out]
particle4 the index of the fourth particle connected by the torsion-torsion
* @param particle5 the index of the fifth particle connected by the torsion-torsion
* @param
[out]
particle5 the index of the fifth particle connected by the torsion-torsion
* @param chiralCheckAtomIndex the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
* @param
[out]
chiralCheckAtomIndex the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check
* @param gridIndex the grid index
* @param
[out]
gridIndex the grid index
*/
*/
void
getTorsionTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
int
&
particle5
,
int
&
chiralCheckAtomIndex
,
int
&
gridIndex
)
const
;
void
getTorsionTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
int
&
particle5
,
int
&
chiralCheckAtomIndex
,
int
&
gridIndex
)
const
;
...
@@ -117,7 +117,7 @@ public:
...
@@ -117,7 +117,7 @@ public:
/**
/**
* Get the torsion-torsion grid at the specified index
* Get the torsion-torsion grid at the specified index
*
*
* @param
gridI
ndex the grid index
* @param
i
ndex
the grid index
* @return grid return grid reference
* @return grid return grid reference
*/
*/
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
getTorsionTorsionGrid
(
int
index
)
const
;
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
getTorsionTorsionGrid
(
int
index
)
const
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
View file @
80cc954a
...
@@ -98,10 +98,10 @@ public:
...
@@ -98,10 +98,10 @@ public:
* Get the force field parameters for a vdw particle.
* Get the force field parameters for a vdw particle.
*
*
* @param particleIndex the particle index
* @param particleIndex the particle index
* @param parentIndex the index of the parent particle
* @param
[out]
parentIndex the index of the parent particle
* @param sigma vdw sigma
* @param
[out]
sigma vdw sigma
* @param epsilon vdw epsilon
* @param
[out]
epsilon vdw epsilon
* @param reductionFactor the fraction of the distance along the line from the parent particle to this particle
* @param
[out]
reductionFactor the fraction of the distance along the line from the parent particle to this particle
* at which the interaction site should be placed
* at which the interaction site should be placed
*/
*/
void
getParticleParameters
(
int
particleIndex
,
int
&
parentIndex
,
double
&
sigma
,
double
&
epsilon
,
double
&
reductionFactor
)
const
;
void
getParticleParameters
(
int
particleIndex
,
int
&
parentIndex
,
double
&
sigma
,
double
&
epsilon
,
double
&
reductionFactor
)
const
;
...
@@ -179,7 +179,7 @@ public:
...
@@ -179,7 +179,7 @@ public:
* Get exclusions for specified particle
* Get exclusions for specified particle
*
*
* @param particleIndex particle index
* @param particleIndex particle index
* @param exclusions vector of exclusions
* @param
[out]
exclusions vector of exclusions
*/
*/
void
getParticleExclusions
(
int
particleIndex
,
std
::
vector
<
int
>&
exclusions
)
const
;
void
getParticleExclusions
(
int
particleIndex
,
std
::
vector
<
int
>&
exclusions
)
const
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
View file @
80cc954a
...
@@ -76,8 +76,8 @@ public:
...
@@ -76,8 +76,8 @@ public:
* Get the force field parameters for a WCA dispersion particle.
* Get the force field parameters for a WCA dispersion particle.
*
*
* @param particleIndex the particle index
* @param particleIndex the particle index
* @param radius radius
* @param
[out]
radius radius
* @param epsilon epsilon
* @param
[out]
epsilon epsilon
*/
*/
void
getParticleParameters
(
int
particleIndex
,
double
&
radius
,
double
&
epsilon
)
const
;
void
getParticleParameters
(
int
particleIndex
,
double
&
radius
,
double
&
epsilon
)
const
;
...
...
plugins/drude/openmmapi/include/openmm/DrudeForce.h
View file @
80cc954a
...
@@ -92,18 +92,18 @@ public:
...
@@ -92,18 +92,18 @@ public:
* Get the parameters for a Drude particle.
* Get the parameters for a Drude particle.
*
*
* @param index the index of the Drude particle for which to get parameters
* @param index the index of the Drude particle for which to get parameters
* @param particle the index within the System of the Drude particle
* @param
[out]
particle the index within the System of the Drude particle
* @param particle1 the index within the System of the particle to which the Drude particle is attached
* @param
[out]
particle1 the index within the System of the particle to which the Drude particle is attached
* @param particle2 the index within the System of the second particle used for defining anisotropic polarizability.
* @param
[out]
particle2 the index within the System of the second particle used for defining anisotropic polarizability.
* This may be set to -1, in which case aniso12 will be ignored.
* This may be set to -1, in which case aniso12 will be ignored.
* @param particle3 the index within the System of the third particle used for defining anisotropic polarizability.
* @param
[out]
particle3 the index within the System of the third particle used for defining anisotropic polarizability.
* This may be set to -1, in which case aniso34 will be ignored.
* This may be set to -1, in which case aniso34 will be ignored.
* @param particle4 the index within the System of the fourth particle used for defining anisotropic polarizability.
* @param
[out]
particle4 the index within the System of the fourth particle used for defining anisotropic polarizability.
* This may be set to -1, in which case aniso34 will be ignored.
* This may be set to -1, in which case aniso34 will be ignored.
* @param charge The charge on the Drude particle
* @param
[out]
charge The charge on the Drude particle
* @param polarizability The isotropic polarizability
* @param
[out]
polarizability The isotropic polarizability
* @param aniso12 The scale factor for the polarizability along the direction defined by particle1 and particle2
* @param
[out]
aniso12 The scale factor for the polarizability along the direction defined by particle1 and particle2
* @param aniso34 The scale factor for the polarizability along the direction defined by particle3 and particle4
* @param
[out]
aniso34 The scale factor for the polarizability along the direction defined by particle3 and particle4
*/
*/
void
getParticleParameters
(
int
index
,
int
&
particle
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
charge
,
double
&
polarizability
,
double
&
aniso12
,
double
&
aniso34
)
const
;
void
getParticleParameters
(
int
index
,
int
&
particle
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
charge
,
double
&
polarizability
,
double
&
aniso12
,
double
&
aniso34
)
const
;
/**
/**
...
@@ -137,9 +137,9 @@ public:
...
@@ -137,9 +137,9 @@ public:
* Get the force field parameters for screened pair.
* Get the force field parameters for screened pair.
*
*
* @param index the index of the pair for which to get parameters
* @param index the index of the pair for which to get parameters
* @param particle1 the index within this Force of the first particle involved in the interaction
* @param
[out]
particle1 the index within this Force of the first particle involved in the interaction
* @param particle2 the index within this Force of the second particle involved in the interaction
* @param
[out]
particle2 the index within this Force of the second particle involved in the interaction
* @param thole the Thole screening factor
* @param
[out]
thole the Thole screening factor
*/
*/
void
getScreenedPairParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
thole
)
const
;
void
getScreenedPairParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
thole
)
const
;
/**
/**
...
...
serialization/include/openmm/serialization/SerializationNode.h
View file @
80cc954a
...
@@ -105,7 +105,7 @@ public:
...
@@ -105,7 +105,7 @@ public:
/**
/**
* Determine whether this node has a property with a particular node.
* Determine whether this node has a property with a particular node.
*
*
* @param the name of the property to check for
* @param
name
the name of the property to check for
*/
*/
bool
hasProperty
(
const
std
::
string
&
name
)
const
;
bool
hasProperty
(
const
std
::
string
&
name
)
const
;
/**
/**
...
...
wrappers/python/filterPythonFiles.py
View file @
80cc954a
from
__future__
import
print_function
from
__future__
import
print_function
import
re
import
sys
import
sys
import
textwrap
from
inspect
import
cleandoc
from
numpydoc.docscrape
import
NumpyDocString
# Doxygen does a bad job of generating documentation based on docstrings. This script is run as a filter
# Doxygen does a bad job of generating documentation based on docstrings.
# on each file, and converts the docstrings into Doxygen style comments so we get better documentation.
# This script is run as a filter
# on each file, and converts the docstrings into Doxygen style comments
# so we get better documentation.
input
=
open
(
sys
.
argv
[
1
])
input
=
open
(
sys
.
argv
[
1
])
while
True
:
while
True
:
line
=
input
.
readline
()
line
=
input
.
readline
()
if
len
(
line
)
==
0
:
if
len
(
line
)
==
0
:
...
@@ -15,10 +24,10 @@ while True:
...
@@ -15,10 +24,10 @@ while True:
split
=
stripped
.
split
()
split
=
stripped
.
split
()
if
split
[
0
]
==
'class'
and
split
[
1
][
0
].
islower
():
if
split
[
0
]
==
'class'
and
split
[
1
][
0
].
islower
():
# Classes that start with a lowercase letter were defined by SWIG. We want to hide them.
# Classes that start with a lowercase letter were defined by SWIG. We want to hide them.
print
(
"%s## @private"
%
prefix
)
print
(
"%s## @private"
%
prefix
,
end
=
''
)
if
split
[
1
][
0
]
==
'_'
and
split
[
1
][
1
]
!=
'_'
:
if
split
[
1
][
0
]
==
'_'
and
split
[
1
][
1
]
!=
'_'
:
# Names starting with a single _ are assumed to be private.
# Names starting with a single _ are assumed to be private.
print
(
"%s## @private"
%
prefix
)
print
(
"%s## @private"
%
prefix
,
end
=
''
)
# We're at the start of a class or function definition. Find all lines that contain the declaration.
# We're at the start of a class or function definition. Find all lines that contain the declaration.
...
@@ -28,33 +37,44 @@ while True:
...
@@ -28,33 +37,44 @@ while True:
declaration
+=
line
declaration
+=
line
# Now look for a docstring.
# Now look for a docstring.
docstringlines
=
[]
docstrings
=
[]
line
=
input
.
readline
()
line
=
input
.
readline
()
stripped
=
line
.
l
strip
()
l
=
line
.
strip
()
if
stripped
.
startswith
(
'"""'
):
if
l
.
startswith
(
'"""'
)
or
l
.
startswith
(
"'''"
):
line
=
stripped
[
3
:]
if
l
.
count
(
'"""'
)
==
2
or
l
.
count
(
"'''"
)
==
2
:
readingParameters
=
False
docstringlines
.
append
(
l
[
3
:
-
3
])
while
line
.
find
(
'"""'
)
==
-
1
:
else
:
docstrings
.
append
(
l
ine
)
docstring
line
s
.
append
(
l
[
3
:]
)
line
=
input
.
readline
()
line
=
input
.
readline
()
if
line
.
strip
()
==
'Parameters:'
:
l
=
line
.
strip
()
readingParameters
=
True
while
l
.
find
(
'"""'
)
==
-
1
and
l
.
find
(
"'''"
)
==
-
1
:
docstringlines
.
append
(
line
.
rstrip
())
line
=
input
.
readline
()
line
=
input
.
readline
()
stripped
=
line
.
l
strip
()
l
=
line
.
strip
()
if
readingParameters
and
stripped
.
start
swith
(
'- '
):
if
line
.
rstrip
().
endswith
(
'"""'
)
or
line
.
rstrip
().
end
swith
(
"'''"
):
line
=
"@param %s"
%
stripped
[
2
:]
# last line
elif
stripped
.
startswith
(
'Returns:'
):
docstringlines
.
append
(
line
.
rstrip
()[:
-
3
])
line
=
"@return %s"
%
stripped
[
8
:]
l
in
e
=
line
[:
line
.
find
(
'"""'
)]
docstr
in
g
=
NumpyDocString
(
cleandoc
(
'
\n
'
.
join
(
docstringlines
)))
docstring
s
.
append
(
line
)
# print(
docstring
lines)
# Print out the docstring in Doxygen syntax, followed by the declaration.
# Print out the docstring in Doxygen syntax, followed by the declaration.
for
line
in
docstring
[
'Summary'
]:
print
(
'{prefix}## {line}'
.
format
(
prefix
=
prefix
,
line
=
line
))
if
len
(
docstring
[
'Extended Summary'
])
>
0
:
print
(
'{prefix}##'
.
format
(
prefix
=
prefix
))
for
line
in
docstring
[
'Extended Summary'
]:
print
(
'{prefix}## {line}'
.
format
(
prefix
=
prefix
,
line
=
line
.
strip
()))
print
(
'{prefix}##'
.
format
(
prefix
=
prefix
))
for
name
,
type
,
descr
in
docstring
[
'Parameters'
]:
print
(
'{prefix}## @param {name} ({type}) {descr}'
.
format
(
prefix
=
prefix
,
type
=
type
,
name
=
name
,
descr
=
' '
.
join
(
descr
)))
for
name
,
type
,
descr
in
docstring
[
'Returns'
]:
if
type
==
''
:
type
=
name
print
(
'{prefix}## @return ({type}) {descr}'
.
format
(
prefix
=
prefix
,
type
=
type
,
name
=
name
,
descr
=
' '
.
join
(
descr
)))
for
s
in
docstrings
:
print
(
declaration
,
end
=
''
)
print
(
"%s##%s"
%
(
prefix
,
s
.
strip
()))
if
len
(
docstringlines
)
==
0
:
print
(
declaration
)
print
(
line
,
end
=
''
)
if
len
(
docstrings
)
==
0
:
print
(
line
)
else
:
else
:
print
(
line
)
print
(
line
,
end
=
''
)
\ No newline at end of file
wrappers/python/simtk/openmm/amd.py
View file @
80cc954a
...
@@ -49,10 +49,14 @@ class AMDIntegrator(CustomIntegrator):
...
@@ -49,10 +49,14 @@ class AMDIntegrator(CustomIntegrator):
def
__init__
(
self
,
dt
,
alpha
,
E
):
def
__init__
(
self
,
dt
,
alpha
,
E
):
"""Create an AMDIntegrator.
"""Create an AMDIntegrator.
Parameters:
Parameters
- dt (time) The integration time step to use
----------
- alpha (energy) The alpha parameter to use
dt : time
- E (energy) The energy cutoff to use
The integration time step to use
alpha : energy
The alpha parameter to use
E : energy
The energy cutoff to use
"""
"""
CustomIntegrator
.
__init__
(
self
,
dt
)
CustomIntegrator
.
__init__
(
self
,
dt
)
self
.
addGlobalVariable
(
"alpha"
,
alpha
)
self
.
addGlobalVariable
(
"alpha"
,
alpha
)
...
@@ -104,11 +108,16 @@ class AMDForceGroupIntegrator(CustomIntegrator):
...
@@ -104,11 +108,16 @@ class AMDForceGroupIntegrator(CustomIntegrator):
def
__init__
(
self
,
dt
,
group
,
alphaGroup
,
EGroup
):
def
__init__
(
self
,
dt
,
group
,
alphaGroup
,
EGroup
):
"""Create a AMDForceGroupIntegrator.
"""Create a AMDForceGroupIntegrator.
Parameters:
Parameters
- dt (time) The integration time step to use
----------
- group (int) The force group to apply the boost to
dt : time
- alphaGroup (energy) The alpha parameter to use for the boosted force group
The integration time step to use
- EGroup (energy) The energy cutoff to use for the boosted force group
group : int
The force group to apply the boost to
alphaGroup : energy
The alpha parameter to use for the boosted force group
EGroup : energy
The energy cutoff to use for the boosted force group
"""
"""
CustomIntegrator
.
__init__
(
self
,
dt
)
CustomIntegrator
.
__init__
(
self
,
dt
)
self
.
addGlobalVariable
(
"alphaGroup"
,
alphaGroup
)
self
.
addGlobalVariable
(
"alphaGroup"
,
alphaGroup
)
...
@@ -144,9 +153,14 @@ class AMDForceGroupIntegrator(CustomIntegrator):
...
@@ -144,9 +153,14 @@ class AMDForceGroupIntegrator(CustomIntegrator):
def
getEffectiveEnergy
(
self
,
groupEnergy
):
def
getEffectiveEnergy
(
self
,
groupEnergy
):
"""Given the actual group energy of the system, return the value of the effective potential.
"""Given the actual group energy of the system, return the value of the effective potential.
Parameters:
Parameters
- groupEnergy (energy): the actual potential energy of the boosted force group
----------
Returns: the value of the effective potential
groupEnergy : energy
the actual potential energy of the boosted force group
Returns
-------
the value of the effective potential
"""
"""
alphaGroup
=
self
.
getAlphaGroup
()
alphaGroup
=
self
.
getAlphaGroup
()
EGroup
=
self
.
getEGroup
()
EGroup
=
self
.
getEGroup
()
...
@@ -172,13 +186,20 @@ class DualAMDIntegrator(CustomIntegrator):
...
@@ -172,13 +186,20 @@ class DualAMDIntegrator(CustomIntegrator):
def
__init__
(
self
,
dt
,
group
,
alphaTotal
,
ETotal
,
alphaGroup
,
EGroup
):
def
__init__
(
self
,
dt
,
group
,
alphaTotal
,
ETotal
,
alphaGroup
,
EGroup
):
"""Create a DualAMDIntegrator.
"""Create a DualAMDIntegrator.
Parameters:
Parameters
- dt (time) The integration time step to use
----------
- group (int) The force group to apply the second boost to
dt : time
- alphaTotal (energy) The alpha parameter to use for the total energy
The integration time step to use
- ETotal (energy) The energy cutoff to use for the total energy
group : int
- alphaGroup (energy) The alpha parameter to use for the boosted force group
The force group to apply the second boost to
- EGroup (energy) The energy cutoff to use for the boosted force group
alphaTotal : energy
The alpha parameter to use for the total energy
ETotal : energy
The energy cutoff to use for the total energy
alphaGroup : energy
The alpha parameter to use for the boosted force group
EGroup : energy
The energy cutoff to use for the boosted force group
"""
"""
CustomIntegrator
.
__init__
(
self
,
dt
)
CustomIntegrator
.
__init__
(
self
,
dt
)
self
.
addGlobalVariable
(
"alphaTotal"
,
alphaTotal
)
self
.
addGlobalVariable
(
"alphaTotal"
,
alphaTotal
)
...
@@ -237,10 +258,16 @@ class DualAMDIntegrator(CustomIntegrator):
...
@@ -237,10 +258,16 @@ class DualAMDIntegrator(CustomIntegrator):
def
getEffectiveEnergy
(
self
,
totalEnergy
,
groupEnergy
):
def
getEffectiveEnergy
(
self
,
totalEnergy
,
groupEnergy
):
"""Given the actual potential energy of the system, return the value of the effective potential.
"""Given the actual potential energy of the system, return the value of the effective potential.
Parameters:
Parameters
- totalEnergy (energy): the actual potential energy of the whole system
----------
- groupEnergy (energy): the actual potential energy of the boosted force group
totalEnergy : energy
Returns: the value of the effective potential
the actual potential energy of the whole system
groupEnergy : energy
the actual potential energy of the boosted force group
Returns
-------
the value of the effective potential
"""
"""
alphaTotal
=
self
.
getAlphaTotal
()
alphaTotal
=
self
.
getAlphaTotal
()
ETotal
=
self
.
getETotal
()
ETotal
=
self
.
getETotal
()
...
...
wrappers/python/simtk/openmm/app/amberinpcrdfile.py
View file @
80cc954a
...
@@ -60,12 +60,17 @@ class AmberInpcrdFile(object):
...
@@ -60,12 +60,17 @@ class AmberInpcrdFile(object):
def
__init__
(
self
,
file
,
loadVelocities
=
None
,
loadBoxVectors
=
None
):
def
__init__
(
self
,
file
,
loadVelocities
=
None
,
loadBoxVectors
=
None
):
"""Load an inpcrd file.
"""Load an inpcrd file.
An inpcrd file contains atom positions and, optionally, velocities and periodic box dimensions.
An inpcrd file contains atom positions and, optionally, velocities and
periodic box dimensions.
Parameters:
- file (string) the name of the file to load
Parameters
- loadVelocities (boolean=None) deprecated. Velocities are loaded automatically if present
----------
- loadBoxVectors (boolean=None) deprecated. Box vectors are loaded automatically if present
file : str
The name of the file to load
loadVelocities : bool
Deprecated. Velocities are loaded automatically if present
loadBoxVectors : bool
Deprecated. Box vectors are loaded automatically if present
"""
"""
self
.
file
=
file
self
.
file
=
file
if
loadVelocities
is
not
None
or
loadBoxVectors
is
not
None
:
if
loadVelocities
is
not
None
or
loadBoxVectors
is
not
None
:
...
@@ -84,8 +89,11 @@ class AmberInpcrdFile(object):
...
@@ -84,8 +89,11 @@ class AmberInpcrdFile(object):
def
getPositions
(
self
,
asNumpy
=
False
):
def
getPositions
(
self
,
asNumpy
=
False
):
"""Get the atomic positions.
"""Get the atomic positions.
Parameters:
Parameters
- asNumpy (boolean=False) if true, the values are returned as a numpy array instead of a list of Vec3s
----------
asNumpy : bool=False
if true, the values are returned as a numpy array instead of a list
of Vec3s
"""
"""
if
asNumpy
:
if
asNumpy
:
if
self
.
_numpyPositions
is
None
:
if
self
.
_numpyPositions
is
None
:
...
@@ -97,8 +105,10 @@ class AmberInpcrdFile(object):
...
@@ -97,8 +105,10 @@ class AmberInpcrdFile(object):
def
getVelocities
(
self
,
asNumpy
=
False
):
def
getVelocities
(
self
,
asNumpy
=
False
):
"""Get the atomic velocities.
"""Get the atomic velocities.
Parameters:
Parameters
- asNumpy (boolean=False) if true, the vectors are returned as numpy arrays instead of Vec3s
----------
asNumpy : bool=False
if true, the vectors are returned as numpy arrays instead of Vec3s
"""
"""
if
self
.
velocities
is
None
:
if
self
.
velocities
is
None
:
raise
AttributeError
(
'velocities not found in %s'
%
self
.
file
)
raise
AttributeError
(
'velocities not found in %s'
%
self
.
file
)
...
@@ -112,8 +122,11 @@ class AmberInpcrdFile(object):
...
@@ -112,8 +122,11 @@ class AmberInpcrdFile(object):
def
getBoxVectors
(
self
,
asNumpy
=
False
):
def
getBoxVectors
(
self
,
asNumpy
=
False
):
"""Get the periodic box vectors.
"""Get the periodic box vectors.
Parameters:
Parameters
- asNumpy (boolean=False) if true, the values are returned as a numpy array instead of a list of Vec3s
----------
asNumpy : bool=False
if true, the values are returned as a numpy array instead of a list
of Vec3s
"""
"""
if
self
.
boxVectors
is
None
:
if
self
.
boxVectors
is
None
:
raise
AttributeError
(
'Box information not found in %s'
%
self
.
file
)
raise
AttributeError
(
'Box information not found in %s'
%
self
.
file
)
...
...
wrappers/python/simtk/openmm/app/amberprmtopfile.py
View file @
80cc954a
...
@@ -151,29 +151,52 @@ class AmberPrmtopFile(object):
...
@@ -151,29 +151,52 @@ class AmberPrmtopFile(object):
implicitSolventKappa
=
None
,
temperature
=
298.15
*
unit
.
kelvin
,
implicitSolventKappa
=
None
,
temperature
=
298.15
*
unit
.
kelvin
,
soluteDielectric
=
1.0
,
solventDielectric
=
78.5
,
soluteDielectric
=
1.0
,
solventDielectric
=
78.5
,
removeCMMotion
=
True
,
hydrogenMass
=
None
,
ewaldErrorTolerance
=
0.0005
):
removeCMMotion
=
True
,
hydrogenMass
=
None
,
ewaldErrorTolerance
=
0.0005
):
"""Construct an OpenMM System representing the topology described by this prmtop file.
"""Construct an OpenMM System representing the topology described by this
prmtop file.
Parameters:
Parameters
- nonbondedMethod (object=NoCutoff) The method to use for nonbonded interactions. Allowed values are
----------
nonbondedMethod : object=NoCutoff
The method to use for nonbonded interactions. Allowed values are
NoCutoff, CutoffNonPeriodic, CutoffPeriodic, Ewald, or PME.
NoCutoff, CutoffNonPeriodic, CutoffPeriodic, Ewald, or PME.
- nonbondedCutoff (distance=1*nanometer) The cutoff distance to use for nonbonded interactions
nonbondedCutoff : distance=1*nanometer
- constraints (object=None) Specifies which bonds angles should be implemented with constraints.
The cutoff distance to use for nonbonded interactions
constraints : object=None
Specifies which bonds angles should be implemented with constraints.
Allowed values are None, HBonds, AllBonds, or HAngles.
Allowed values are None, HBonds, AllBonds, or HAngles.
- rigidWater (boolean=True) If true, water molecules will be fully rigid regardless of the value passed for the constraints argument
rigidWater : boolean=True
- implicitSolvent (object=None) If not None, the implicit solvent model to use. Allowed values are HCT, OBC1, OBC2, GBn, or GBn2.
If true, water molecules will be fully rigid regardless of the value
- implicitSolventSaltConc (float=0.0*unit.moles/unit.liter) The salt concentration for GB
passed for the constraints argument
calculations (modelled as a debye screening parameter). It is converted to the debye length (kappa)
implicitSolvent : object=None
If not None, the implicit solvent model to use. Allowed values are
HCT, OBC1, OBC2, GBn, or GBn2.
implicitSolventSaltConc : float=0.0*unit.moles/unit.liter
The salt concentration for GB calculations (modelled as a debye
screening parameter). It is converted to the debye length (kappa)
using the provided temperature and solventDielectric
using the provided temperature and solventDielectric
- temperature (float=300*kelvin) Temperature of the system. Only used to compute the Debye length from
temperature : float=300*kelvin
implicitSolventSoltConc
Temperature of the system. Only used to compute the Debye length
- implicitSolventKappa (float units of 1/length) If this value is set, implicitSolventSaltConc will be ignored.
from implicitSolventSoltConc
- soluteDielectric (float=1.0) The solute dielectric constant to use in the implicit solvent model.
implicitSolventKappa : float units of 1/length
- solventDielectric (float=78.5) The solvent dielectric constant to use in the implicit solvent model.
If this value is set, implicitSolventSaltConc will be ignored.
- removeCMMotion (boolean=True) If true, a CMMotionRemover will be added to the System
soluteDielectric : float=1.0
- hydrogenMass (mass=None) The mass to use for hydrogen atoms bound to heavy atoms. Any mass added to a hydrogen is
The solute dielectric constant to use in the implicit solvent model.
subtracted from the heavy atom to keep their total mass the same.
solventDielectric : float=78.5
- ewaldErrorTolerance (float=0.0005) The error tolerance to use if nonbondedMethod is Ewald or PME.
The solvent dielectric constant to use in the implicit solvent
Returns: the newly created System
model.
removeCMMotion : boolean=True
If true, a CMMotionRemover will be added to the System
hydrogenMass : mass=None
The mass to use for hydrogen atoms bound to heavy atoms. Any mass
added to a hydrogen is subtracted from the heavy atom to keep their
total mass the same.
ewaldErrorTolerance : float=0.0005
The error tolerance to use if nonbondedMethod is Ewald or PME.
Returns
-------
System
the newly created System
"""
"""
if
self
.
_prmtop
.
chamber
:
if
self
.
_prmtop
.
chamber
:
raise
ValueError
(
"CHAMBER-style topology file detected. CHAMBER "
raise
ValueError
(
"CHAMBER-style topology file detected. CHAMBER "
...
...
wrappers/python/simtk/openmm/app/charmmcrdfiles.py
View file @
80cc954a
...
@@ -49,12 +49,17 @@ class CharmmCrdFile(object):
...
@@ -49,12 +49,17 @@ class CharmmCrdFile(object):
Reads and parses a CHARMM coordinate file (.crd) into its components,
Reads and parses a CHARMM coordinate file (.crd) into its components,
namely the coordinates, CHARMM atom types, resid, resname, etc.
namely the coordinates, CHARMM atom types, resid, resname, etc.
Main attributes:
Attributes
- natom (int) : Number of atoms in the system
----------
- resname (list) : Names of all residues
natom : int
- positions (list) : All cartesian coordinates [x1, y1, z1, x2, ...]
Number of atoms in the system
resname : list
Example:
Names of all residues
positions : list
All cartesian coordinates [x1, y1, z1, x2, ...]
Examples
--------
>>> chm = CharmmCrdFile('testfiles/1tnm.crd')
>>> chm = CharmmCrdFile('testfiles/1tnm.crd')
>>> print '%d atoms; %d coords' % (chm.natom, len(chm.positions))
>>> print '%d atoms; %d coords' % (chm.natom, len(chm.positions))
1414 atoms; 1414 coords
1414 atoms; 1414 coords
...
@@ -131,14 +136,21 @@ class CharmmRstFile(object):
...
@@ -131,14 +136,21 @@ class CharmmRstFile(object):
Reads and parses data, velocities and coordinates from a CHARMM restart
Reads and parses data, velocities and coordinates from a CHARMM restart
file (.rst) of file name 'fname' into class attributes
file (.rst) of file name 'fname' into class attributes
Main attributes:
Attributes
- natom (int) : Number of atoms in the system
----------
- resname (list) : Names of all residues
natom : int
- positions (list) : All cartesian coordinates [x1, y1, z1, x2, ...]
Number of atoms in the system
- positionsold (list) : Old cartesian coordinates
resname : list
- velocities (list) : List of all cartesian velocities
Names of all residues
positions : list
Example:
All cartesian coordinates [x1, y1, z1, x2, ...]
positionsold : list
Old cartesian coordinates
velocities : list
List of all cartesian velocities
Examples
--------
>>> chm = CharmmRstFile('testfiles/sample-charmm.rst')
>>> chm = CharmmRstFile('testfiles/sample-charmm.rst')
>>> print chm.header[0]
>>> print chm.header[0]
REST 37 1
REST 37 1
...
...
wrappers/python/simtk/openmm/app/charmmparameterset.py
View file @
80cc954a
...
@@ -51,18 +51,19 @@ class CharmmParameterSet(object):
...
@@ -51,18 +51,19 @@ class CharmmParameterSet(object):
the information found in the MASS section of the CHARMM topology file
the information found in the MASS section of the CHARMM topology file
(TOP/RTF) and all of the information in the parameter files (PAR)
(TOP/RTF) and all of the information in the parameter files (PAR)
Parameters
:
Parameters
-
filenames : List of topology, parameter, and stream files to load into
-
---------
the parameter set. The following
file t
ype suffixes are recognized
.
filenames : List of topology, parameter, and stream
file
s
t
o load into the parameter set
.
Unrecognized file types raise a TypeError
The following file type suffixes are recognized.
Unrecognized file types raise a TypeError
.rtf, .top -- Residue topology file
*
.rtf, .top -- Residue topology file
.par, .prm -- Parameter file
*
.par, .prm -- Parameter file
.str -- Stream file
*
.str -- Stream file
.inp -- If "par" is in the file name, it is a parameter file. If
*
.inp -- If "par" is in the file name, it is a parameter file. If
"top" is in the file name, it is a topology file. Otherwise,
"top" is in the file name, it is a topology file. Otherwise,
raise TypeError
raise TypeError
Attributes:
Attributes
----------
All type lists are dictionaries whose keys are tuples (with however
All type lists are dictionaries whose keys are tuples (with however
many elements are needed to define that type of parameter). The types
many elements are needed to define that type of parameter). The types
that can be in any order are SORTED.
that can be in any order are SORTED.
...
@@ -85,7 +86,8 @@ class CharmmParameterSet(object):
...
@@ -85,7 +86,8 @@ class CharmmParameterSet(object):
when only the integer or string is available the other dictionaries are
when only the integer or string is available the other dictionaries are
helpful
helpful
Example:
Examples
--------
>>> params = CharmmParameterSet('charmm22.top', 'charmm22.par', 'file.str')
>>> params = CharmmParameterSet('charmm22.top', 'charmm22.par', 'file.str')
"""
"""
...
@@ -150,18 +152,25 @@ class CharmmParameterSet(object):
...
@@ -150,18 +152,25 @@ class CharmmParameterSet(object):
Instantiates a CharmmParameterSet from a Topology file and a Parameter
Instantiates a CharmmParameterSet from a Topology file and a Parameter
file (or just a Parameter file if it has all information)
file (or just a Parameter file if it has all information)
Parameters:
Parameters
- tfile (str) : Name of the Topology (RTF/TOP) file
-----------
- pfile (str) : Name of the Parameter (PAR) file
tfile : str
- sfiles (list of str) : List or tuple of stream (STR) file names.
Name of the Topology (RTF/TOP) file
- permissive (bool) : Accept non-bonbded parameters for undefined
pfile : str
atom types (default False)
Name of the Parameter (PAR) file
sfiles : list of str
Returns:
List or tuple of stream (STR) file names.
permissive : bool=False
Accept non-bonbded parameters for undefined atom types
Returns
-------
CharmmParameterSet
New CharmmParameterSet populated with the parameters found in the
New CharmmParameterSet populated with the parameters found in the
provided files.
provided files.
Notes:
Notes
-----
The RTF file is read first (if provided), followed by the PAR file,
The RTF file is read first (if provided), followed by the PAR file,
followed by the list of stream files (in the order they are
followed by the list of stream files (in the order they are
provided). Parameters in each stream file will overwrite those that
provided). Parameters in each stream file will overwrite those that
...
@@ -183,21 +192,24 @@ class CharmmParameterSet(object):
...
@@ -183,21 +192,24 @@ class CharmmParameterSet(object):
return
inst
return
inst
def
readParameterFile
(
self
,
pfile
,
permissive
=
False
):
def
readParameterFile
(
self
,
pfile
,
permissive
=
False
):
"""
"""Reads all of the parameters from a parameter file. Versions 36 and later
Reads all of the parameters from a parameter file. Versions 36 and
of the CHARMM force field files have an ATOMS section defining all of
later of the CHARMM force field files have an ATOMS section defining
the atom types. Older versions need to load this information from the
all of the atom types. Older versions need to load this information
RTF/TOP files.
from the RTF/TOP files.
Parameters
Parameters:
----------
- pfile (str) : Name of the CHARMM PARameter file to read
pfile : str
- permissive (bool) : Accept non-bonbded parameters for undefined
Name of the CHARMM PARameter file to read
atom types (default False)
permissive : bool
Accept non-bonbded parameters for undefined atom types (default:
Notes: The atom types must all be loaded by the end of this routine.
False).
Either supply a PAR file with atom definitions in them or read in a
RTF/TOP file first. Failure to do so will result in a raised
Notes
RuntimeError.
-----
The atom types must all be loaded by the end of this routine. Either
supply a PAR file with atom definitions in them or read in a RTF/TOP
file first. Failure to do so will result in a raised RuntimeError.
"""
"""
conv
=
CharmmParameterSet
.
_convert
conv
=
CharmmParameterSet
.
_convert
if
isinstance
(
pfile
,
str
):
if
isinstance
(
pfile
,
str
):
...
@@ -518,14 +530,17 @@ class CharmmParameterSet(object):
...
@@ -518,14 +530,17 @@ class CharmmParameterSet(object):
if
own_handle
:
f
.
close
()
if
own_handle
:
f
.
close
()
def
readTopologyFile
(
self
,
tfile
):
def
readTopologyFile
(
self
,
tfile
):
"""
"""Reads _only_ the atom type definitions from a topology file. This is
Reads _only_ the atom type definitions from a topology file. This is
unnecessary for versions 36 and later of the CHARMM force field.
unnecessary for versions 36 and later of the CHARMM force field.
Parameters:
Parameters
- tfile (str) : Name of the CHARMM TOPology file to read
----------
tfile : str
: Name of the CHARMM TOPology file to read
Note: The CHARMM TOPology file is also called a Residue Topology File
Notes
-----
The CHARMM TOPology file is also called a Residue Topology File
"""
"""
conv
=
CharmmParameterSet
.
_convert
conv
=
CharmmParameterSet
.
_convert
if
isinstance
(
tfile
,
str
):
if
isinstance
(
tfile
,
str
):
...
@@ -564,12 +579,13 @@ class CharmmParameterSet(object):
...
@@ -564,12 +579,13 @@ class CharmmParameterSet(object):
if
own_handle
:
f
.
close
()
if
own_handle
:
f
.
close
()
def
readStreamFile
(
self
,
sfile
):
def
readStreamFile
(
self
,
sfile
):
"""
"""Reads RTF and PAR sections from a stream file and dispatches the
Reads RTF and PAR sections from a stream file and dispatches the
sections to readTopologyFile or readParameterFile
sections to readTopologyFile or readParameterFile
Parameters:
Parameters
- sfile (str or CharmmStreamFile) : Stream file to parse
----------
sfile : str or CharmmStreamFile
Stream file to parse
"""
"""
if
isinstance
(
sfile
,
CharmmStreamFile
):
if
isinstance
(
sfile
,
CharmmStreamFile
):
f
=
sfile
f
=
sfile
...
@@ -594,14 +610,8 @@ class CharmmParameterSet(object):
...
@@ -594,14 +610,8 @@ class CharmmParameterSet(object):
bond, angle, dihedral, improper, or cmap type will pair with EVERY key
bond, angle, dihedral, improper, or cmap type will pair with EVERY key
in the type mapping dictionaries that points to the equivalent type
in the type mapping dictionaries that points to the equivalent type
Returns:
Example
- Returns the instance that is being condensed.
-------
Notes:
The return value allows you to condense the types at construction
time.
Example:
>>> params = CharmmParameterSet('charmm.prm').condense()
>>> params = CharmmParameterSet('charmm.prm').condense()
"""
"""
# First scan through all of the bond types
# First scan through all of the bond types
...
@@ -631,8 +641,10 @@ class CharmmParameterSet(object):
...
@@ -631,8 +641,10 @@ class CharmmParameterSet(object):
"""
"""
Loops through the given dict and condenses all types.
Loops through the given dict and condenses all types.
Parameter:
Parameters
- typedict : Type dictionary to condense
----------
typedict
Type dictionary to condense
"""
"""
keylist
=
list
(
typedict
.
keys
())
keylist
=
list
(
typedict
.
keys
())
for
i
in
range
(
len
(
keylist
)
-
1
):
for
i
in
range
(
len
(
keylist
)
-
1
):
...
...
Prev
1
2
3
4
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