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
c6ebf6e2
Commit
c6ebf6e2
authored
Sep 28, 2012
by
Peter Eastman
Browse files
Removed the word "harmonic" from lots of places it didn't belong, including class and method names
parent
58b094ce
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
279 additions
and
279 deletions
+279
-279
plugins/amoeba/openmmapi/include/OpenMMAmoeba.h
plugins/amoeba/openmmapi/include/OpenMMAmoeba.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
+17
-17
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
+12
-12
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
...amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
+16
-16
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
+18
-18
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
.../openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
+10
-10
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
...a/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
+10
-10
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
...api/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
+10
-10
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
+16
-16
plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp
+10
-10
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
+12
-12
plugins/amoeba/openmmapi/src/AmoebaBondForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaBondForceImpl.cpp
+11
-11
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
+16
-16
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForceImpl.cpp
+10
-10
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaData.h
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaData.h
+1
-1
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernelFactory.cpp
...amoeba/platforms/cuda-old/src/AmoebaCudaKernelFactory.cpp
+9
-9
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernels.cpp
+38
-38
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernels.h
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernels.h
+18
-18
plugins/amoeba/platforms/cuda-old/tests/AmoebaTinkerParameterFile.cpp
...ba/platforms/cuda-old/tests/AmoebaTinkerParameterFile.cpp
+39
-39
plugins/amoeba/platforms/cuda-old/tests/AmoebaTinkerParameterFile.h
...oeba/platforms/cuda-old/tests/AmoebaTinkerParameterFile.h
+3
-3
No files found.
plugins/amoeba/openmmapi/include/OpenMMAmoeba.h
View file @
c6ebf6e2
...
...
@@ -32,9 +32,9 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "openmm/Amoeba
Harmonic
BondForce.h"
#include "openmm/Amoeba
Harmonic
AngleForce.h"
#include "openmm/Amoeba
Harmonic
InPlaneAngleForce.h"
#include "openmm/AmoebaBondForce.h"
#include "openmm/AmoebaAngleForce.h"
#include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/AmoebaPiTorsionForce.h"
#include "openmm/AmoebaStretchBendForce.h"
#include "openmm/AmoebaOutOfPlaneBendForce.h"
...
...
plugins/amoeba/openmmapi/include/openmm/Amoeba
Harmonic
AngleForce.h
→
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
View file @
c6ebf6e2
#ifndef OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_H_
#define OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_H_
#ifndef OPENMM_AMOEBA_ANGLE_FORCE_H_
#define OPENMM_AMOEBA_ANGLE_FORCE_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
...
...
@@ -44,21 +44,21 @@ namespace OpenMM {
* is set per-angle. The coefficients of the higher order terms each have a single value that
* is set globally.
*
* To use it, create an Amoeba
Harmonic
AngleForce object then call addAngle() once for each angle. After
* To use it, create an AmoebaAngleForce object then call addAngle() once for each angle. After
* an angle has been added, you can modify its force field parameters by calling setAngleParameters().
*/
class
OPENMM_EXPORT
Amoeba
Harmonic
AngleForce
:
public
Force
{
class
OPENMM_EXPORT
AmoebaAngleForce
:
public
Force
{
public:
/**
* Create an Amoeba
Harmonic
AngleForce.
* Create an AmoebaAngleForce.
*/
Amoeba
Harmonic
AngleForce
();
AmoebaAngleForce
();
/**
* Get the number of
harmonic
angle stretch terms in the potential function
* Get the number of angle stretch terms in the potential function
*/
int
getNumAngles
()
const
{
return
angles
.
size
();
...
...
@@ -69,56 +69,56 @@ public:
*
* @param cubicK the cubic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
AngleCubic
(
double
cubicK
);
void
setAmoebaGlobalAngleCubic
(
double
cubicK
);
/**
* Get the global cubic term
*
* @return global cubicK term
*/
double
getAmoebaGlobal
Harmonic
AngleCubic
(
void
)
const
;
double
getAmoebaGlobalAngleCubic
(
void
)
const
;
/**
* Set the global quartic term
*
* @param quarticK the quartic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
AngleQuartic
(
double
quarticK
);
void
setAmoebaGlobalAngleQuartic
(
double
quarticK
);
/**
* Get the global quartic term
*
* @return global quartic term
*/
double
getAmoebaGlobal
Harmonic
AngleQuartic
(
void
)
const
;
double
getAmoebaGlobalAngleQuartic
(
void
)
const
;
/**
* Set the global pentic term
*
* @param penticK the pentic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
AnglePentic
(
double
penticK
);
void
setAmoebaGlobalAnglePentic
(
double
penticK
);
/**
* Get the global pentic term
*
* @return global penticK term
*/
double
getAmoebaGlobal
Harmonic
AnglePentic
(
void
)
const
;
double
getAmoebaGlobalAnglePentic
(
void
)
const
;
/**
* Set the global sextic term
*
* @param sexticK the sextic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
AngleSextic
(
double
sexticK
);
void
setAmoebaGlobalAngleSextic
(
double
sexticK
);
/**
* Get the global sextic term
*
* @return global sextic term
*/
double
getAmoebaGlobal
Harmonic
AngleSextic
(
void
)
const
;
double
getAmoebaGlobalAngleSextic
(
void
)
const
;
/**
* Add an angle term to the force field.
...
...
@@ -164,7 +164,7 @@ private:
std
::
vector
<
AngleInfo
>
angles
;
};
class
Amoeba
Harmonic
AngleForce
::
AngleInfo
{
class
AmoebaAngleForce
::
AngleInfo
{
public:
int
particle1
,
particle2
,
particle3
;
double
length
,
quadraticK
;
...
...
@@ -179,4 +179,4 @@ public:
}
// namespace OpenMM
#endif
/*OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_H_*/
#endif
/*OPENMM_AMOEBA_ANGLE_FORCE_H_*/
plugins/amoeba/openmmapi/include/openmm/Amoeba
Harmonic
BondForce.h
→
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
View file @
c6ebf6e2
#ifndef OPENMM_AMOEBA_
HARMONIC_
BOND_FORCE_H_
#define OPENMM_AMOEBA_
HARMONIC_
BOND_FORCE_H_
#ifndef OPENMM_AMOEBA_BOND_FORCE_H_
#define OPENMM_AMOEBA_BOND_FORCE_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
...
...
@@ -46,18 +46,18 @@ namespace OpenMM {
* is set per-bond. The coefficients of the higher order terms each have a single value that
* is set globally.
*
* To use it, create an Amoeba
Harmonic
BondForce object then call addBond() once for each bond. After
* To use it, create an AmoebaBondForce object then call addBond() once for each bond. After
* a bond has been added, you can modify its force field parameters by calling setBondParameters().
*/
class
OPENMM_EXPORT
Amoeba
Harmonic
BondForce
:
public
Force
{
class
OPENMM_EXPORT
AmoebaBondForce
:
public
Force
{
public:
/**
* Create an Amoeba
Harmonic
BondForce.
* Create an AmoebaBondForce.
*/
Amoeba
Harmonic
BondForce
();
AmoebaBondForce
();
/**
* Get the number of bond stretch terms in the potential function
*/
...
...
@@ -70,28 +70,28 @@ public:
*
* @param cubicK the cubic force constant for the bond
*/
void
setAmoebaGlobal
Harmonic
BondCubic
(
double
cubicK
);
void
setAmoebaGlobalBondCubic
(
double
cubicK
);
/**
* Get the global cubic term
*
* @return global cubicK term
*/
double
getAmoebaGlobal
Harmonic
BondCubic
(
void
)
const
;
double
getAmoebaGlobalBondCubic
(
void
)
const
;
/**
* Set the global quartic term
*
* @param quarticK the quartic force constant for the bond
*/
void
setAmoebaGlobal
Harmonic
BondQuartic
(
double
quarticK
);
void
setAmoebaGlobalBondQuartic
(
double
quarticK
);
/**
* Get the global quartic term
*
* @return global quartic term
*/
double
getAmoebaGlobal
Harmonic
BondQuartic
(
void
)
const
;
double
getAmoebaGlobalBondQuartic
(
void
)
const
;
/**
* Add a bond term to the force field.
...
...
@@ -136,7 +136,7 @@ private:
std
::
vector
<
BondInfo
>
bonds
;
};
class
Amoeba
Harmonic
BondForce
::
BondInfo
{
class
AmoebaBondForce
::
BondInfo
{
public:
int
particle1
,
particle2
;
double
length
,
quadraticK
;
...
...
@@ -151,4 +151,4 @@ public:
}
// namespace OpenMM
#endif
/*OPENMM_AMOEBA_
HARMONIC_
BOND_FORCE_H_*/
#endif
/*OPENMM_AMOEBA_BOND_FORCE_H_*/
plugins/amoeba/openmmapi/include/openmm/Amoeba
Harmonic
InPlaneAngleForce.h
→
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
View file @
c6ebf6e2
#ifndef OPENMM_AMOEBA_
HARMONIC_
IN_PLANE_ANGLE_FORCE_H_
#define OPENMM_AMOEBA_
HARMONIC_
IN_PLANE_ANGLE_FORCE_H_
#ifndef OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_H_
#define OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
...
...
@@ -44,18 +44,18 @@ namespace OpenMM {
* quadratic term is set per-angle. The coefficients of the higher order terms each have a single value that
* is set globally.
*
* To use it, create an Amoeba
Harmonic
InPlaneAngle object then call addAngle() once for each angle. After
* To use it, create an AmoebaInPlaneAngle
Force
object then call addAngle() once for each angle. After
* an angle has been added, you can modify its force field parameters by calling setAngleParameters().
*/
class
OPENMM_EXPORT
Amoeba
Harmonic
InPlaneAngleForce
:
public
Force
{
class
OPENMM_EXPORT
AmoebaInPlaneAngleForce
:
public
Force
{
public:
/**
* Create an Amoeba
Harmonic
AngleForce.
* Create an AmoebaAngleForce.
*/
Amoeba
Harmonic
InPlaneAngleForce
();
AmoebaInPlaneAngleForce
();
/**
* Get the number of in-plane angle terms in the potential function
...
...
@@ -69,56 +69,56 @@ public:
*
* @param cubicK the cubic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
InPlaneAngleCubic
(
double
cubicK
);
void
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
);
/**
* Get the global cubic term
*
* @return global cubicK term
*/
double
getAmoebaGlobal
Harmonic
InPlaneAngleCubic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAngleCubic
(
void
)
const
;
/**
* Set the global quartic term
*
* @param quarticK the quartic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
InPlaneAngleQuartic
(
double
quarticK
);
void
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
);
/**
* Get the global quartic term
*
* @return global quartic term
*/
double
getAmoebaGlobal
Harmonic
InPlaneAngleQuartic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAngleQuartic
(
void
)
const
;
/**
* Set the global pentic term
*
* @param penticK the pentic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
InPlaneAnglePentic
(
double
penticK
);
void
setAmoebaGlobalInPlaneAnglePentic
(
double
penticK
);
/**
* Get the global pentic term
*
* @return global penticK term
*/
double
getAmoebaGlobal
Harmonic
InPlaneAnglePentic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAnglePentic
(
void
)
const
;
/**
* Set the global sextic term
*
* @param sexticK the sextic force constant for the angle
*/
void
setAmoebaGlobal
Harmonic
InPlaneAngleSextic
(
double
sexticK
);
void
setAmoebaGlobalInPlaneAngleSextic
(
double
sexticK
);
/**
* Get the global sextic term
*
* @return global sextic term
*/
double
getAmoebaGlobal
Harmonic
InPlaneAngleSextic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAngleSextic
(
void
)
const
;
/**
* Add an angle term to the force field.
...
...
@@ -169,7 +169,7 @@ private:
std
::
vector
<
AngleInfo
>
angles
;
};
class
Amoeba
Harmonic
InPlaneAngleForce
::
AngleInfo
{
class
AmoebaInPlaneAngleForce
::
AngleInfo
{
public:
int
particle1
,
particle2
,
particle3
,
particle4
;
double
length
,
quadraticK
;
...
...
@@ -185,4 +185,4 @@ public:
}
// namespace OpenMM
#endif
/*OPENMM_AMOEBA_
HARMONIC_
IN_PLANE_ANGLE_FORCE_H_*/
#endif
/*OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_H_*/
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
View file @
c6ebf6e2
...
...
@@ -44,26 +44,26 @@
namespace
OpenMM
{
/**
* This kernel is invoked by Amoeba
Harmonic
BondForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaBondForce to calculate the forces acting on the system and the energy of the system.
*/
class
CalcAmoeba
Harmonic
BondForceKernel
:
public
KernelImpl
{
class
CalcAmoebaBondForceKernel
:
public
KernelImpl
{
public:
static
std
::
string
Name
()
{
return
"CalcAmoeba
Harmonic
BondForce"
;
return
"CalcAmoebaBondForce"
;
}
CalcAmoeba
Harmonic
BondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
CalcAmoebaBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
}
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param force the Amoeba
Harmonic
BondForce this kernel will be used for
* @param force the AmoebaBondForce this kernel will be used for
*/
virtual
void
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
BondForce
&
force
)
=
0
;
virtual
void
initialize
(
const
System
&
system
,
const
AmoebaBondForce
&
force
)
=
0
;
/**
* Execute the kernel to calculate the forces and/or energy.
...
...
@@ -78,26 +78,26 @@ public:
};
/**
* This kernel is invoked by Amoeba
Harmonic
AngleForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaAngleForce to calculate the forces acting on the system and the energy of the system.
*/
class
CalcAmoeba
Harmonic
AngleForceKernel
:
public
KernelImpl
{
class
CalcAmoebaAngleForceKernel
:
public
KernelImpl
{
public:
static
std
::
string
Name
()
{
return
"CalcAmoeba
Harmonic
AngleForce"
;
return
"CalcAmoebaAngleForce"
;
}
CalcAmoeba
Harmonic
AngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
CalcAmoebaAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
}
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param force the
Harmonic
AngleForce this kernel will be used for
* @param force the
Amoeba
AngleForce this kernel will be used for
*/
virtual
void
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
AngleForce
&
force
)
=
0
;
virtual
void
initialize
(
const
System
&
system
,
const
AmoebaAngleForce
&
force
)
=
0
;
/**
* Execute the kernel to calculate the forces and/or energy.
...
...
@@ -111,26 +111,26 @@ public:
};
/**
* This kernel is invoked by Amoeba
Harmonic
InPlaneAngleForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaInPlaneAngleForce to calculate the forces acting on the system and the energy of the system.
*/
class
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
:
public
KernelImpl
{
class
CalcAmoebaInPlaneAngleForceKernel
:
public
KernelImpl
{
public:
static
std
::
string
Name
()
{
return
"CalcAmoeba
Harmonic
InPlaneAngleForce"
;
return
"CalcAmoebaInPlaneAngleForce"
;
}
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
CalcAmoebaInPlaneAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
}
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param force the
Harmonic
InPlaneAngleForce this kernel will be used for
* @param force the
Amoeba
InPlaneAngleForce this kernel will be used for
*/
virtual
void
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
InPlaneAngleForce
&
force
)
=
0
;
virtual
void
initialize
(
const
System
&
system
,
const
AmoebaInPlaneAngleForce
&
force
)
=
0
;
/**
* Execute the kernel to calculate the forces and/or energy.
...
...
plugins/amoeba/openmmapi/include/openmm/internal/Amoeba
Harmonic
AngleForceImpl.h
→
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
View file @
c6ebf6e2
#ifndef OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_IMPL_H_
#define OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_IMPL_H_
#ifndef OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_
#define OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
...
...
@@ -33,7 +33,7 @@
* -------------------------------------------------------------------------- */
#include "openmm/internal/ForceImpl.h"
#include "openmm/Amoeba
Harmonic
AngleForce.h"
#include "openmm/AmoebaAngleForce.h"
#include "openmm/Kernel.h"
#include <utility>
#include <set>
...
...
@@ -42,15 +42,15 @@
namespace
OpenMM
{
/**
* This is the internal implementation of Amoeba
Harmonic
AngleForce.
* This is the internal implementation of AmoebaAngleForce.
*/
class
Amoeba
Harmonic
AngleForceImpl
:
public
ForceImpl
{
class
AmoebaAngleForceImpl
:
public
ForceImpl
{
public:
Amoeba
Harmonic
AngleForceImpl
(
Amoeba
Harmonic
AngleForce
&
owner
);
~
Amoeba
Harmonic
AngleForceImpl
();
AmoebaAngleForceImpl
(
AmoebaAngleForce
&
owner
);
~
AmoebaAngleForceImpl
();
void
initialize
(
ContextImpl
&
context
);
Amoeba
Harmonic
AngleForce
&
getOwner
()
{
AmoebaAngleForce
&
getOwner
()
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -62,10 +62,10 @@ public:
}
std
::
vector
<
std
::
string
>
getKernelNames
();
private:
Amoeba
Harmonic
AngleForce
&
owner
;
AmoebaAngleForce
&
owner
;
Kernel
kernel
;
};
}
// namespace OpenMM
#endif
/*OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_IMPL_H_*/
#endif
/*OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_*/
plugins/amoeba/openmmapi/include/openmm/internal/Amoeba
Harmonic
BondForceImpl.h
→
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
View file @
c6ebf6e2
#ifndef OPENMM_AMOEBA_
HARMONIC_
BOND_FORCE_IMPL_H_
#define OPENMM_AMOEBA_
HARMONIC_
BOND_FORCE_IMPL_H_
#ifndef OPENMM_AMOEBA_BOND_FORCE_IMPL_H_
#define OPENMM_AMOEBA_BOND_FORCE_IMPL_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
...
...
@@ -33,7 +33,7 @@
* -------------------------------------------------------------------------- */
#include "openmm/internal/ForceImpl.h"
#include "openmm/Amoeba
Harmonic
BondForce.h"
#include "openmm/AmoebaBondForce.h"
#include "openmm/Kernel.h"
#include <utility>
#include <set>
...
...
@@ -43,15 +43,15 @@
namespace
OpenMM
{
/**
* This is the internal implementation of Amoeba
Harmonic
BondForce.
* This is the internal implementation of AmoebaBondForce.
*/
class
Amoeba
Harmonic
BondForceImpl
:
public
ForceImpl
{
class
AmoebaBondForceImpl
:
public
ForceImpl
{
public:
Amoeba
Harmonic
BondForceImpl
(
Amoeba
Harmonic
BondForce
&
owner
);
~
Amoeba
Harmonic
BondForceImpl
();
AmoebaBondForceImpl
(
AmoebaBondForce
&
owner
);
~
AmoebaBondForceImpl
();
void
initialize
(
ContextImpl
&
context
);
Amoeba
Harmonic
BondForce
&
getOwner
()
{
AmoebaBondForce
&
getOwner
()
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -65,10 +65,10 @@ public:
std
::
vector
<
std
::
pair
<
int
,
int
>
>
getBondedParticles
()
const
;
private:
Amoeba
Harmonic
BondForce
&
owner
;
AmoebaBondForce
&
owner
;
Kernel
kernel
;
};
}
// namespace OpenMM
#endif
/*OPENMM_
HARMONIC_
BOND_FORCE_IMPL_H_*/
#endif
/*OPENMM_BOND_FORCE_IMPL_H_*/
plugins/amoeba/openmmapi/include/openmm/internal/Amoeba
Harmonic
InPlaneAngleForceImpl.h
→
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
View file @
c6ebf6e2
#ifndef OPENMM_AMOEBA_
HARMONIC_
IN_PLANE_ANGLE_FORCE_IMPL_H_
#define OPENMM_AMOEBA_
HARMONIC_
IN_PLANE_ANGLE_FORCE_IMPL_H_
#ifndef OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_IMPL_H_
#define OPENMM_AMOEBA_IN_PLANE_ANGLE_FORCE_IMPL_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
...
...
@@ -33,7 +33,7 @@
* -------------------------------------------------------------------------- */
#include "openmm/internal/ForceImpl.h"
#include "openmm/Amoeba
Harmonic
InPlaneAngleForce.h"
#include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/Kernel.h"
#include <utility>
#include <set>
...
...
@@ -42,15 +42,15 @@
namespace
OpenMM
{
/**
* This is the internal implementation of Amoeba
Harmonic
InPlaneAngleForce.
* This is the internal implementation of AmoebaInPlaneAngleForce.
*/
class
Amoeba
Harmonic
InPlaneAngleForceImpl
:
public
ForceImpl
{
class
AmoebaInPlaneAngleForceImpl
:
public
ForceImpl
{
public:
Amoeba
Harmonic
InPlaneAngleForceImpl
(
Amoeba
Harmonic
InPlaneAngleForce
&
owner
);
~
Amoeba
Harmonic
InPlaneAngleForceImpl
();
AmoebaInPlaneAngleForceImpl
(
AmoebaInPlaneAngleForce
&
owner
);
~
AmoebaInPlaneAngleForceImpl
();
void
initialize
(
ContextImpl
&
context
);
Amoeba
Harmonic
InPlaneAngleForce
&
getOwner
()
{
AmoebaInPlaneAngleForce
&
getOwner
()
{
return
owner
;
}
void
updateContextState
(
ContextImpl
&
context
)
{
...
...
@@ -62,10 +62,10 @@ public:
}
std
::
vector
<
std
::
string
>
getKernelNames
();
private:
Amoeba
Harmonic
InPlaneAngleForce
&
owner
;
AmoebaInPlaneAngleForce
&
owner
;
Kernel
kernel
;
};
}
// namespace OpenMM
#endif
/*OPENMM_AMOEBA_
HARMONIC_
ANGLE_FORCE_IMPL_H_*/
#endif
/*OPENMM_AMOEBA_ANGLE_FORCE_IMPL_H_*/
plugins/amoeba/openmmapi/src/Amoeba
Harmonic
AngleForce.cpp
→
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
View file @
c6ebf6e2
...
...
@@ -31,21 +31,21 @@
#include "openmm/Force.h"
#include "openmm/OpenMMException.h"
#include "openmm/Amoeba
Harmonic
AngleForce.h"
#include "openmm/internal/Amoeba
Harmonic
AngleForceImpl.h"
#include "openmm/AmoebaAngleForce.h"
#include "openmm/internal/AmoebaAngleForceImpl.h"
using
namespace
OpenMM
;
Amoeba
Harmonic
AngleForce
::
Amoeba
Harmonic
AngleForce
()
{
AmoebaAngleForce
::
AmoebaAngleForce
()
{
_globalCubicK
=
_globalQuarticK
=
_globalPenticK
=
_globalSexticK
=
0.0
;
}
int
Amoeba
Harmonic
AngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
)
{
int
AmoebaAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
)
{
angles
.
push_back
(
AngleInfo
(
particle1
,
particle2
,
particle3
,
length
,
quadraticK
));
return
angles
.
size
()
-
1
;
}
void
Amoeba
Harmonic
AngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
void
AmoebaAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
length
,
double
&
quadraticK
)
const
{
particle1
=
angles
[
index
].
particle1
;
particle2
=
angles
[
index
].
particle2
;
...
...
@@ -54,7 +54,7 @@ void AmoebaHarmonicAngleForce::getAngleParameters(int index, int& particle1, int
quadraticK
=
angles
[
index
].
quadraticK
;
}
void
Amoeba
Harmonic
AngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
void
AmoebaAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
)
{
angles
[
index
].
particle1
=
particle1
;
angles
[
index
].
particle2
=
particle2
;
...
...
@@ -63,38 +63,38 @@ void AmoebaHarmonicAngleForce::setAngleParameters(int index, int particle1, int
angles
[
index
].
quadraticK
=
quadraticK
;
}
double
Amoeba
Harmonic
AngleForce
::
getAmoebaGlobal
Harmonic
AngleCubic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAngleCubic
(
void
)
const
{
return
_globalCubicK
;
}
void
Amoeba
Harmonic
AngleForce
::
setAmoebaGlobal
Harmonic
AngleCubic
(
double
cubicK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
double
Amoeba
Harmonic
AngleForce
::
getAmoebaGlobal
Harmonic
AngleQuartic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAngleQuartic
(
void
)
const
{
return
_globalQuarticK
;
}
void
Amoeba
Harmonic
AngleForce
::
setAmoebaGlobal
Harmonic
AngleQuartic
(
double
quarticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
Amoeba
Harmonic
AngleForce
::
getAmoebaGlobal
Harmonic
AnglePentic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAnglePentic
(
void
)
const
{
return
_globalPenticK
;
}
void
Amoeba
Harmonic
AngleForce
::
setAmoebaGlobal
Harmonic
AnglePentic
(
double
penticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAnglePentic
(
double
penticK
)
{
_globalPenticK
=
penticK
;
}
double
Amoeba
Harmonic
AngleForce
::
getAmoebaGlobal
Harmonic
AngleSextic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAngleSextic
(
void
)
const
{
return
_globalSexticK
;
}
void
Amoeba
Harmonic
AngleForce
::
setAmoebaGlobal
Harmonic
AngleSextic
(
double
sexticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleSextic
(
double
sexticK
)
{
_globalSexticK
=
sexticK
;
}
ForceImpl
*
Amoeba
Harmonic
AngleForce
::
createImpl
()
{
return
new
Amoeba
Harmonic
AngleForceImpl
(
*
this
);
ForceImpl
*
AmoebaAngleForce
::
createImpl
()
{
return
new
AmoebaAngleForceImpl
(
*
this
);
}
plugins/amoeba/openmmapi/src/Amoeba
Harmonic
AngleForceImpl.cpp
→
plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp
View file @
c6ebf6e2
...
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/Amoeba
Harmonic
AngleForceImpl.h"
#include "openmm/internal/AmoebaAngleForceImpl.h"
#include "openmm/amoebaKernels.h"
using
namespace
OpenMM
;
...
...
@@ -39,26 +39,26 @@ using std::pair;
using
std
::
vector
;
using
std
::
set
;
Amoeba
Harmonic
AngleForceImpl
::
Amoeba
Harmonic
AngleForceImpl
(
Amoeba
Harmonic
AngleForce
&
owner
)
:
owner
(
owner
)
{
AmoebaAngleForceImpl
::
AmoebaAngleForceImpl
(
AmoebaAngleForce
&
owner
)
:
owner
(
owner
)
{
}
Amoeba
Harmonic
AngleForceImpl
::~
Amoeba
Harmonic
AngleForceImpl
()
{
AmoebaAngleForceImpl
::~
AmoebaAngleForceImpl
()
{
}
void
Amoeba
Harmonic
AngleForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcAmoeba
Harmonic
AngleForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcAmoeba
Harmonic
AngleForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
void
AmoebaAngleForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcAmoebaAngleForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcAmoebaAngleForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
}
double
Amoeba
Harmonic
AngleForceImpl
::
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
double
AmoebaAngleForceImpl
::
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
if
((
groups
&
(
1
<<
owner
.
getForceGroup
()))
!=
0
)
return
kernel
.
getAs
<
CalcAmoeba
Harmonic
AngleForceKernel
>
().
execute
(
context
,
includeForces
,
includeEnergy
);
return
kernel
.
getAs
<
CalcAmoebaAngleForceKernel
>
().
execute
(
context
,
includeForces
,
includeEnergy
);
return
0.0
;
}
std
::
vector
<
std
::
string
>
Amoeba
Harmonic
AngleForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
AmoebaAngleForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoeba
Harmonic
AngleForceKernel
::
Name
());
names
.
push_back
(
CalcAmoebaAngleForceKernel
::
Name
());
return
names
;
}
plugins/amoeba/openmmapi/src/Amoeba
Harmonic
BondForce.cpp
→
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
View file @
c6ebf6e2
...
...
@@ -31,50 +31,50 @@
#include "openmm/Force.h"
#include "openmm/OpenMMException.h"
#include "openmm/Amoeba
Harmonic
BondForce.h"
#include "openmm/internal/Amoeba
Harmonic
BondForceImpl.h"
#include "openmm/AmoebaBondForce.h"
#include "openmm/internal/AmoebaBondForceImpl.h"
using
namespace
OpenMM
;
Amoeba
Harmonic
BondForce
::
Amoeba
Harmonic
BondForce
()
{
AmoebaBondForce
::
AmoebaBondForce
()
{
_globalCubicK
=
_globalQuarticK
=
0.0
;
}
int
Amoeba
Harmonic
BondForce
::
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
int
AmoebaBondForce
::
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
bonds
.
push_back
(
BondInfo
(
particle1
,
particle2
,
length
,
quadraticK
));
return
bonds
.
size
()
-
1
;
}
void
Amoeba
Harmonic
BondForce
::
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
{
void
AmoebaBondForce
::
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
{
particle1
=
bonds
[
index
].
particle1
;
particle2
=
bonds
[
index
].
particle2
;
length
=
bonds
[
index
].
length
;
quadraticK
=
bonds
[
index
].
quadraticK
;
}
void
Amoeba
Harmonic
BondForce
::
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
void
AmoebaBondForce
::
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
bonds
[
index
].
particle1
=
particle1
;
bonds
[
index
].
particle2
=
particle2
;
bonds
[
index
].
length
=
length
;
bonds
[
index
].
quadraticK
=
quadraticK
;
}
void
Amoeba
Harmonic
BondForce
::
setAmoebaGlobal
Harmonic
BondCubic
(
double
cubicK
)
{
void
AmoebaBondForce
::
setAmoebaGlobalBondCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
void
Amoeba
Harmonic
BondForce
::
setAmoebaGlobal
Harmonic
BondQuartic
(
double
quarticK
)
{
void
AmoebaBondForce
::
setAmoebaGlobalBondQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
Amoeba
Harmonic
BondForce
::
getAmoebaGlobal
Harmonic
BondCubic
(
void
)
const
{
double
AmoebaBondForce
::
getAmoebaGlobalBondCubic
(
void
)
const
{
return
_globalCubicK
;
}
double
Amoeba
Harmonic
BondForce
::
getAmoebaGlobal
Harmonic
BondQuartic
(
void
)
const
{
double
AmoebaBondForce
::
getAmoebaGlobalBondQuartic
(
void
)
const
{
return
_globalQuarticK
;
}
ForceImpl
*
Amoeba
Harmonic
BondForce
::
createImpl
()
{
return
new
Amoeba
Harmonic
BondForceImpl
(
*
this
);
ForceImpl
*
AmoebaBondForce
::
createImpl
()
{
return
new
AmoebaBondForceImpl
(
*
this
);
}
plugins/amoeba/openmmapi/src/Amoeba
Harmonic
BondForceImpl.cpp
→
plugins/amoeba/openmmapi/src/AmoebaBondForceImpl.cpp
View file @
c6ebf6e2
...
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/Amoeba
Harmonic
BondForceImpl.h"
#include "openmm/internal/AmoebaBondForceImpl.h"
#include "openmm/amoebaKernels.h"
#include "openmm/Platform.h"
...
...
@@ -40,30 +40,30 @@ using std::pair;
using
std
::
vector
;
using
std
::
set
;
Amoeba
Harmonic
BondForceImpl
::
Amoeba
Harmonic
BondForceImpl
(
Amoeba
Harmonic
BondForce
&
owner
)
:
owner
(
owner
)
{
AmoebaBondForceImpl
::
AmoebaBondForceImpl
(
AmoebaBondForce
&
owner
)
:
owner
(
owner
)
{
}
Amoeba
Harmonic
BondForceImpl
::~
Amoeba
Harmonic
BondForceImpl
()
{
AmoebaBondForceImpl
::~
AmoebaBondForceImpl
()
{
}
void
Amoeba
Harmonic
BondForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcAmoeba
Harmonic
BondForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcAmoeba
Harmonic
BondForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
void
AmoebaBondForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcAmoebaBondForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcAmoebaBondForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
}
double
Amoeba
Harmonic
BondForceImpl
::
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
double
AmoebaBondForceImpl
::
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
if
((
groups
&
(
1
<<
owner
.
getForceGroup
()))
!=
0
)
return
kernel
.
getAs
<
CalcAmoeba
Harmonic
BondForceKernel
>
().
execute
(
context
,
includeForces
,
includeEnergy
);
return
kernel
.
getAs
<
CalcAmoebaBondForceKernel
>
().
execute
(
context
,
includeForces
,
includeEnergy
);
return
0.0
;
}
std
::
vector
<
std
::
string
>
Amoeba
Harmonic
BondForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
AmoebaBondForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoeba
Harmonic
BondForceKernel
::
Name
());
names
.
push_back
(
CalcAmoebaBondForceKernel
::
Name
());
return
names
;
}
vector
<
pair
<
int
,
int
>
>
Amoeba
Harmonic
BondForceImpl
::
getBondedParticles
()
const
{
vector
<
pair
<
int
,
int
>
>
AmoebaBondForceImpl
::
getBondedParticles
()
const
{
int
numBonds
=
owner
.
getNumBonds
();
vector
<
pair
<
int
,
int
>
>
bonds
(
numBonds
);
for
(
int
i
=
0
;
i
<
numBonds
;
i
++
)
{
...
...
plugins/amoeba/openmmapi/src/Amoeba
Harmonic
InPlaneAngleForce.cpp
→
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
View file @
c6ebf6e2
...
...
@@ -31,21 +31,21 @@
#include "openmm/Force.h"
#include "openmm/OpenMMException.h"
#include "openmm/Amoeba
Harmonic
InPlaneAngleForce.h"
#include "openmm/internal/Amoeba
Harmonic
InPlaneAngleForceImpl.h"
#include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/internal/AmoebaInPlaneAngleForceImpl.h"
using
namespace
OpenMM
;
Amoeba
Harmonic
InPlaneAngleForce
::
Amoeba
Harmonic
InPlaneAngleForce
()
{
AmoebaInPlaneAngleForce
::
AmoebaInPlaneAngleForce
()
{
_globalCubicK
=
_globalQuarticK
=
_globalPenticK
=
_globalSexticK
=
0.0
;
}
int
Amoeba
Harmonic
InPlaneAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
{
int
AmoebaInPlaneAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
{
angles
.
push_back
(
AngleInfo
(
particle1
,
particle2
,
particle3
,
particle4
,
length
,
quadraticK
));
return
angles
.
size
()
-
1
;
}
void
Amoeba
Harmonic
InPlaneAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
void
AmoebaInPlaneAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
length
,
double
&
quadraticK
)
const
{
particle1
=
angles
[
index
].
particle1
;
particle2
=
angles
[
index
].
particle2
;
...
...
@@ -55,7 +55,7 @@ void AmoebaHarmonicInPlaneAngleForce::getAngleParameters(int index, int& particl
quadraticK
=
angles
[
index
].
quadraticK
;
}
void
Amoeba
Harmonic
InPlaneAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
void
AmoebaInPlaneAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
{
angles
[
index
].
particle1
=
particle1
;
angles
[
index
].
particle2
=
particle2
;
...
...
@@ -65,38 +65,38 @@ void AmoebaHarmonicInPlaneAngleForce::setAngleParameters(int index, int particle
angles
[
index
].
quadraticK
=
quadraticK
;
}
void
Amoeba
Harmonic
InPlaneAngleForce
::
setAmoebaGlobal
Harmonic
InPlaneAngleCubic
(
double
cubicK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
void
Amoeba
Harmonic
InPlaneAngleForce
::
setAmoebaGlobal
Harmonic
InPlaneAngleQuartic
(
double
quarticK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
Amoeba
Harmonic
InPlaneAngleForce
::
getAmoebaGlobal
Harmonic
InPlaneAngleCubic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleCubic
(
void
)
const
{
return
_globalCubicK
;
}
double
Amoeba
Harmonic
InPlaneAngleForce
::
getAmoebaGlobal
Harmonic
InPlaneAngleQuartic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleQuartic
(
void
)
const
{
return
_globalQuarticK
;
}
void
Amoeba
Harmonic
InPlaneAngleForce
::
setAmoebaGlobal
Harmonic
InPlaneAnglePentic
(
double
cubicK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAnglePentic
(
double
cubicK
)
{
_globalPenticK
=
cubicK
;
}
void
Amoeba
Harmonic
InPlaneAngleForce
::
setAmoebaGlobal
Harmonic
InPlaneAngleSextic
(
double
quarticK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleSextic
(
double
quarticK
)
{
_globalSexticK
=
quarticK
;
}
double
Amoeba
Harmonic
InPlaneAngleForce
::
getAmoebaGlobal
Harmonic
InPlaneAnglePentic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAnglePentic
(
void
)
const
{
return
_globalPenticK
;
}
double
Amoeba
Harmonic
InPlaneAngleForce
::
getAmoebaGlobal
Harmonic
InPlaneAngleSextic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleSextic
(
void
)
const
{
return
_globalSexticK
;
}
ForceImpl
*
Amoeba
Harmonic
InPlaneAngleForce
::
createImpl
()
{
return
new
Amoeba
Harmonic
InPlaneAngleForceImpl
(
*
this
);
ForceImpl
*
AmoebaInPlaneAngleForce
::
createImpl
()
{
return
new
AmoebaInPlaneAngleForceImpl
(
*
this
);
}
plugins/amoeba/openmmapi/src/Amoeba
Harmonic
InPlaneAngleForceImpl.cpp
→
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForceImpl.cpp
View file @
c6ebf6e2
...
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/Amoeba
Harmonic
InPlaneAngleForceImpl.h"
#include "openmm/internal/AmoebaInPlaneAngleForceImpl.h"
#include "openmm/amoebaKernels.h"
using
namespace
OpenMM
;
...
...
@@ -39,26 +39,26 @@ using std::pair;
using
std
::
vector
;
using
std
::
set
;
Amoeba
Harmonic
InPlaneAngleForceImpl
::
Amoeba
Harmonic
InPlaneAngleForceImpl
(
Amoeba
Harmonic
InPlaneAngleForce
&
owner
)
:
owner
(
owner
)
{
AmoebaInPlaneAngleForceImpl
::
AmoebaInPlaneAngleForceImpl
(
AmoebaInPlaneAngleForce
&
owner
)
:
owner
(
owner
)
{
}
Amoeba
Harmonic
InPlaneAngleForceImpl
::~
Amoeba
Harmonic
InPlaneAngleForceImpl
()
{
AmoebaInPlaneAngleForceImpl
::~
AmoebaInPlaneAngleForceImpl
()
{
}
void
Amoeba
Harmonic
InPlaneAngleForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
void
AmoebaInPlaneAngleForceImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
CalcAmoebaInPlaneAngleForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcAmoebaInPlaneAngleForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
}
double
Amoeba
Harmonic
InPlaneAngleForceImpl
::
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
double
AmoebaInPlaneAngleForceImpl
::
calcForcesAndEnergy
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
if
((
groups
&
(
1
<<
owner
.
getForceGroup
()))
!=
0
)
return
kernel
.
getAs
<
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
>
().
execute
(
context
,
includeForces
,
includeEnergy
);
return
kernel
.
getAs
<
CalcAmoebaInPlaneAngleForceKernel
>
().
execute
(
context
,
includeForces
,
includeEnergy
);
return
0.0
;
}
std
::
vector
<
std
::
string
>
Amoeba
Harmonic
InPlaneAngleForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
AmoebaInPlaneAngleForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
Name
());
names
.
push_back
(
CalcAmoebaInPlaneAngleForceKernel
::
Name
());
return
names
;
}
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaData.h
View file @
c6ebf6e2
...
...
@@ -35,7 +35,7 @@
namespace
OpenMM
{
/**
* This kernel is invoked by Amoeba
Harmonic
BondForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaBondForce to calculate the forces acting on the system and the energy of the system.
*/
class
AmoebaCudaData
{
public:
...
...
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernelFactory.cpp
View file @
c6ebf6e2
...
...
@@ -43,9 +43,9 @@ extern "C" OPENMMCUDA_EXPORT void registerKernelFactories() {
AmoebaCudaKernelFactory
*
factory
=
new
AmoebaCudaKernelFactory
();
platform
.
registerKernelFactory
(
CalcAmoeba
Harmonic
BondForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoeba
Harmonic
AngleForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoebaBondForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoebaAngleForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoebaInPlaneAngleForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoebaPiTorsionForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoebaStretchBendForceKernel
::
Name
(),
factory
);
platform
.
registerKernelFactory
(
CalcAmoebaOutOfPlaneBendForceKernel
::
Name
(),
factory
);
...
...
@@ -113,14 +113,14 @@ KernelImpl* AmoebaCudaKernelFactory::createKernelImpl(std::string name, const Pl
amoebaCudaData
=
mapIterator
->
second
;
}
if
(
name
==
CalcAmoeba
Harmonic
BondForceKernel
::
Name
())
return
new
CudaCalcAmoeba
Harmonic
BondForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
if
(
name
==
CalcAmoebaBondForceKernel
::
Name
())
return
new
CudaCalcAmoebaBondForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
if
(
name
==
CalcAmoeba
Harmonic
AngleForceKernel
::
Name
())
return
new
CudaCalcAmoeba
Harmonic
AngleForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
if
(
name
==
CalcAmoebaAngleForceKernel
::
Name
())
return
new
CudaCalcAmoebaAngleForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
if
(
name
==
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
Name
())
return
new
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
if
(
name
==
CalcAmoebaInPlaneAngleForceKernel
::
Name
())
return
new
CudaCalcAmoebaInPlaneAngleForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
if
(
name
==
CalcAmoebaPiTorsionForceKernel
::
Name
())
return
new
CudaCalcAmoebaPiTorsionForceKernel
(
name
,
platform
,
*
amoebaCudaData
,
context
.
getSystem
());
...
...
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernels.cpp
View file @
c6ebf6e2
...
...
@@ -64,12 +64,12 @@ static void computeAmoebaLocalForces( AmoebaCudaData& data ) {
}
/* -------------------------------------------------------------------------- *
* Amoeba
HarmonicBond
*
*
Amoeba
BondForce
*
* -------------------------------------------------------------------------- */
class
CudaCalcAmoeba
Harmonic
BondForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
class
CudaCalcAmoebaBondForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
public:
ForceInfo
(
const
Amoeba
Harmonic
BondForce
&
force
)
:
force
(
force
)
{
ForceInfo
(
const
AmoebaBondForce
&
force
)
:
force
(
force
)
{
}
int
getNumParticleGroups
()
{
return
force
.
getNumBonds
();
...
...
@@ -90,19 +90,19 @@ public:
return
(
length1
==
length2
&&
k1
==
k2
);
}
private:
const
Amoeba
Harmonic
BondForce
&
force
;
const
AmoebaBondForce
&
force
;
};
CudaCalcAmoeba
Harmonic
BondForceKernel
::
CudaCalcAmoeba
Harmonic
BondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
)
:
CalcAmoeba
Harmonic
BondForceKernel
(
name
,
platform
),
data
(
data
),
system
(
system
)
{
CudaCalcAmoebaBondForceKernel
::
CudaCalcAmoebaBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
)
:
CalcAmoebaBondForceKernel
(
name
,
platform
),
data
(
data
),
system
(
system
)
{
data
.
incrementKernelCount
();
}
CudaCalcAmoeba
Harmonic
BondForceKernel
::~
CudaCalcAmoeba
Harmonic
BondForceKernel
()
{
CudaCalcAmoebaBondForceKernel
::~
CudaCalcAmoebaBondForceKernel
()
{
data
.
decrementKernelCount
();
}
void
CudaCalcAmoeba
Harmonic
BondForceKernel
::
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
BondForce
&
force
)
{
void
CudaCalcAmoebaBondForceKernel
::
initialize
(
const
System
&
system
,
const
AmoebaBondForce
&
force
)
{
data
.
setAmoebaLocalForcesKernel
(
this
);
...
...
@@ -124,12 +124,12 @@ void CudaCalcAmoebaHarmonicBondForceKernel::initialize(const System& system, con
quadratic
[
i
]
=
static_cast
<
float
>
(
kValue
);
}
gpuSetAmoebaBondParameters
(
data
.
getAmoebaGpu
(),
particle1
,
particle2
,
length
,
quadratic
,
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
BondCubic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
BondQuartic
())
);
static_cast
<
float
>
(
force
.
getAmoebaGlobalBondCubic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalBondQuartic
())
);
data
.
getAmoebaGpu
()
->
gpuContext
->
forces
.
push_back
(
new
ForceInfo
(
force
));
}
double
CudaCalcAmoeba
Harmonic
BondForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
double
CudaCalcAmoebaBondForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
if
(
data
.
getAmoebaLocalForcesKernel
()
==
this
){
computeAmoebaLocalForces
(
data
);
}
...
...
@@ -137,12 +137,12 @@ double CudaCalcAmoebaHarmonicBondForceKernel::execute(ContextImpl& context, bool
}
/* -------------------------------------------------------------------------- *
* Amoeba
HarmonicAngle
*
*
Amoeba
InPlaneAngleForce
*
* -------------------------------------------------------------------------- */
class
CudaCalcAmoeba
Harmonic
AngleForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
class
CudaCalcAmoebaAngleForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
public:
ForceInfo
(
const
Amoeba
Harmonic
AngleForce
&
force
)
:
force
(
force
)
{
ForceInfo
(
const
AmoebaAngleForce
&
force
)
:
force
(
force
)
{
}
int
getNumParticleGroups
()
{
return
force
.
getNumAngles
();
...
...
@@ -164,19 +164,19 @@ public:
return
(
angle1
==
angle2
&&
k1
==
k2
);
}
private:
const
Amoeba
Harmonic
AngleForce
&
force
;
const
AmoebaAngleForce
&
force
;
};
CudaCalcAmoeba
Harmonic
AngleForceKernel
::
CudaCalcAmoeba
Harmonic
AngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
)
:
CalcAmoeba
Harmonic
AngleForceKernel
(
name
,
platform
),
data
(
data
),
system
(
system
)
{
CudaCalcAmoebaAngleForceKernel
::
CudaCalcAmoebaAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
)
:
CalcAmoebaAngleForceKernel
(
name
,
platform
),
data
(
data
),
system
(
system
)
{
data
.
incrementKernelCount
();
}
CudaCalcAmoeba
Harmonic
AngleForceKernel
::~
CudaCalcAmoeba
Harmonic
AngleForceKernel
()
{
CudaCalcAmoebaAngleForceKernel
::~
CudaCalcAmoebaAngleForceKernel
()
{
data
.
decrementKernelCount
();
}
void
CudaCalcAmoeba
Harmonic
AngleForceKernel
::
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
AngleForce
&
force
)
{
void
CudaCalcAmoebaAngleForceKernel
::
initialize
(
const
System
&
system
,
const
AmoebaAngleForce
&
force
)
{
data
.
setAmoebaLocalForcesKernel
(
this
);
...
...
@@ -194,14 +194,14 @@ void CudaCalcAmoebaHarmonicAngleForceKernel::initialize(const System& system, co
k
[
i
]
=
static_cast
<
float
>
(
kQuadratic
);
}
gpuSetAmoebaAngleParameters
(
data
.
getAmoebaGpu
(),
particle1
,
particle2
,
particle3
,
angle
,
k
,
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
AngleCubic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
AngleQuartic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
AnglePentic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
AngleSextic
())
);
static_cast
<
float
>
(
force
.
getAmoebaGlobalAngleCubic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalAngleQuartic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalAnglePentic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalAngleSextic
())
);
data
.
getAmoebaGpu
()
->
gpuContext
->
forces
.
push_back
(
new
ForceInfo
(
force
));
}
double
CudaCalcAmoeba
Harmonic
AngleForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
double
CudaCalcAmoebaAngleForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
if
(
data
.
getAmoebaLocalForcesKernel
()
==
this
){
computeAmoebaLocalForces
(
data
);
}
...
...
@@ -209,12 +209,12 @@ double CudaCalcAmoebaHarmonicAngleForceKernel::execute(ContextImpl& context, boo
}
/* -------------------------------------------------------------------------- *
* Amoeba
Harmonic
InPlaneAngle *
*
AmoebaInPlaneAngle
Force
*
* -------------------------------------------------------------------------- */
class
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
class
CudaCalcAmoebaInPlaneAngleForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
public:
ForceInfo
(
const
Amoeba
Harmonic
InPlaneAngleForce
&
force
)
:
force
(
force
)
{
ForceInfo
(
const
AmoebaInPlaneAngleForce
&
force
)
:
force
(
force
)
{
}
int
getNumParticleGroups
()
{
return
force
.
getNumAngles
();
...
...
@@ -237,19 +237,19 @@ public:
return
(
angle1
==
angle2
&&
k1
==
k2
);
}
private:
const
Amoeba
Harmonic
InPlaneAngleForce
&
force
;
const
AmoebaInPlaneAngleForce
&
force
;
};
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
)
:
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
(
name
,
platform
),
data
(
data
),
system
(
system
)
{
CudaCalcAmoebaInPlaneAngleForceKernel
::
CudaCalcAmoebaInPlaneAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
)
:
CalcAmoebaInPlaneAngleForceKernel
(
name
,
platform
),
data
(
data
),
system
(
system
)
{
data
.
incrementKernelCount
();
}
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
::~
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
()
{
CudaCalcAmoebaInPlaneAngleForceKernel
::~
CudaCalcAmoebaInPlaneAngleForceKernel
()
{
data
.
decrementKernelCount
();
}
void
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
InPlaneAngleForce
&
force
)
{
void
CudaCalcAmoebaInPlaneAngleForceKernel
::
initialize
(
const
System
&
system
,
const
AmoebaInPlaneAngleForce
&
force
)
{
data
.
setAmoebaLocalForcesKernel
(
this
);
...
...
@@ -270,14 +270,14 @@ void CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::initialize(const System& sys
k
[
i
]
=
static_cast
<
float
>
(
kQuadratic
);
}
gpuSetAmoebaInPlaneAngleParameters
(
data
.
getAmoebaGpu
(),
particle1
,
particle2
,
particle3
,
particle4
,
angle
,
k
,
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
InPlaneAngleCubic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
InPlaneAngleQuartic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
InPlaneAnglePentic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobal
Harmonic
InPlaneAngleSextic
()
)
);
static_cast
<
float
>
(
force
.
getAmoebaGlobalInPlaneAngleCubic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalInPlaneAngleQuartic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalInPlaneAnglePentic
()),
static_cast
<
float
>
(
force
.
getAmoebaGlobalInPlaneAngleSextic
()
)
);
data
.
getAmoebaGpu
()
->
gpuContext
->
forces
.
push_back
(
new
ForceInfo
(
force
));
}
double
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
double
CudaCalcAmoebaInPlaneAngleForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
if
(
data
.
getAmoebaLocalForcesKernel
()
==
this
){
computeAmoebaLocalForces
(
data
);
}
...
...
@@ -285,7 +285,7 @@ double CudaCalcAmoebaHarmonicInPlaneAngleForceKernel::execute(ContextImpl& conte
}
/* -------------------------------------------------------------------------- *
* Amoeba
Harmonic
PiTorsion *
*
AmoebaPiTorsion
Force
*
* -------------------------------------------------------------------------- */
class
CudaCalcAmoebaPiTorsionForceKernel
::
ForceInfo
:
public
CudaForceInfo
{
...
...
plugins/amoeba/platforms/cuda-old/src/AmoebaCudaKernels.h
View file @
c6ebf6e2
...
...
@@ -36,22 +36,22 @@
namespace
OpenMM
{
/**
* This kernel is invoked by Amoeba
Harmonic
BondForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaBondForce to calculate the forces acting on the system and the energy of the system.
*/
class
CudaCalcAmoeba
Harmonic
BondForceKernel
:
public
CalcAmoeba
Harmonic
BondForceKernel
{
class
CudaCalcAmoebaBondForceKernel
:
public
CalcAmoebaBondForceKernel
{
public:
CudaCalcAmoeba
Harmonic
BondForceKernel
(
std
::
string
name
,
CudaCalcAmoebaBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
);
~
CudaCalcAmoeba
Harmonic
BondForceKernel
();
~
CudaCalcAmoebaBondForceKernel
();
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param force the Amoeba
Harmonic
BondForce this kernel will be used for
* @param force the AmoebaBondForce this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
BondForce
&
force
);
void
initialize
(
const
System
&
system
,
const
AmoebaBondForce
&
force
);
/**
* Execute the kernel to calculate the forces and/or energy.
*
...
...
@@ -69,19 +69,19 @@ private:
};
/**
* This kernel is invoked by Amoeba
Harmonic
AngleForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaAngleForce to calculate the forces acting on the system and the energy of the system.
*/
class
CudaCalcAmoeba
Harmonic
AngleForceKernel
:
public
CalcAmoeba
Harmonic
AngleForceKernel
{
class
CudaCalcAmoebaAngleForceKernel
:
public
CalcAmoebaAngleForceKernel
{
public:
CudaCalcAmoeba
Harmonic
AngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
);
~
CudaCalcAmoeba
Harmonic
AngleForceKernel
();
CudaCalcAmoebaAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
);
~
CudaCalcAmoebaAngleForceKernel
();
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param force the Amoeba
Harmonic
AngleForce this kernel will be used for
* @param force the AmoebaAngleForce this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
AngleForce
&
force
);
void
initialize
(
const
System
&
system
,
const
AmoebaAngleForce
&
force
);
/**
* Execute the kernel to calculate the forces and/or energy.
*
...
...
@@ -99,19 +99,19 @@ private:
};
/**
* This kernel is invoked by Amoeba
Harmonic
InPlaneAngleForce to calculate the forces acting on the system and the energy of the system.
* This kernel is invoked by AmoebaInPlaneAngleForce to calculate the forces acting on the system and the energy of the system.
*/
class
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
:
public
CalcAmoeba
Harmonic
InPlaneAngleForceKernel
{
class
CudaCalcAmoebaInPlaneAngleForceKernel
:
public
CalcAmoebaInPlaneAngleForceKernel
{
public:
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
);
~
CudaCalcAmoeba
Harmonic
InPlaneAngleForceKernel
();
CudaCalcAmoebaInPlaneAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
AmoebaCudaData
&
data
,
System
&
system
);
~
CudaCalcAmoebaInPlaneAngleForceKernel
();
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param force the Amoeba
Harmonic
InPlaneAngleForce this kernel will be used for
* @param force the AmoebaInPlaneAngleForce this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
Amoeba
Harmonic
InPlaneAngleForce
&
force
);
void
initialize
(
const
System
&
system
,
const
AmoebaInPlaneAngleForce
&
force
);
/**
* Execute the kernel to calculate the forces and/or energy.
*
...
...
plugins/amoeba/platforms/cuda-old/tests/AmoebaTinkerParameterFile.cpp
View file @
c6ebf6e2
...
...
@@ -735,7 +735,7 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
throwException
(
__FILE__
,
__LINE__
,
buffer
);
}
Amoeba
Harmonic
BondForce
*
bondForce
=
new
Amoeba
Harmonic
BondForce
();
AmoebaBondForce
*
bondForce
=
new
AmoebaBondForce
();
MapStringIntI
forceActive
=
forceMap
.
find
(
AMOEBA_HARMONIC_BOND_FORCE
);
if
(
forceActive
!=
forceMap
.
end
()
&&
(
*
forceActive
).
second
){
system
.
addForce
(
bondForce
);
...
...
@@ -763,7 +763,7 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
bondForce
->
addBond
(
particle1
,
particle2
,
length
,
k
);
}
else
{
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"%s Amoeba
Harmonic
BondForce tokens incomplete at line=%d
\n
"
,
methodName
.
c_str
(),
*
lineCount
);
(
void
)
sprintf
(
buffer
,
"%s AmoebaBondForce tokens incomplete at line=%d
\n
"
,
methodName
.
c_str
(),
*
lineCount
);
(
void
)
fprintf
(
log
,
"%s"
,
buffer
);
throwException
(
__FILE__
,
__LINE__
,
buffer
);
}
...
...
@@ -788,11 +788,11 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
}
else
if
(
field
==
"AmoebaHarmonicBondCubic"
){
double
cubicParameter
=
atof
(
tokens
[
1
].
c_str
()
);
bondForce
->
setAmoebaGlobal
Harmonic
BondCubic
(
cubicParameter
);
bondForce
->
setAmoebaGlobalBondCubic
(
cubicParameter
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicBondQuartic"
){
double
quarticParameter
=
atof
(
tokens
[
1
].
c_str
()
);
bondForce
->
setAmoebaGlobal
Harmonic
BondQuartic
(
quarticParameter
);
bondForce
->
setAmoebaGlobalBondQuartic
(
quarticParameter
);
hits
++
;
}
}
...
...
@@ -817,8 +817,8 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
double
cubic
=
0.0
;
double
quartic
=
0.0
;
bondForce
->
setAmoebaGlobal
Harmonic
BondCubic
(
cubic
);
bondForce
->
setAmoebaGlobal
Harmonic
BondQuartic
(
quartic
);
bondForce
->
setAmoebaGlobalBondCubic
(
cubic
);
bondForce
->
setAmoebaGlobalBondQuartic
(
quartic
);
for
(
int
ii
=
0
;
ii
<
bondForce
->
getNumBonds
();
ii
++
){
int
particle1
,
particle2
;
...
...
@@ -831,11 +831,11 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
if
(
useOpenMMUnits
){
double
cubic
=
bondForce
->
getAmoebaGlobal
Harmonic
BondCubic
()
/
AngstromToNm
;
double
quartic
=
bondForce
->
getAmoebaGlobal
Harmonic
BondQuartic
()
/
(
AngstromToNm
*
AngstromToNm
);
double
cubic
=
bondForce
->
getAmoebaGlobalBondCubic
()
/
AngstromToNm
;
double
quartic
=
bondForce
->
getAmoebaGlobalBondQuartic
()
/
(
AngstromToNm
*
AngstromToNm
);
bondForce
->
setAmoebaGlobal
Harmonic
BondCubic
(
cubic
);
bondForce
->
setAmoebaGlobal
Harmonic
BondQuartic
(
quartic
);
bondForce
->
setAmoebaGlobalBondCubic
(
cubic
);
bondForce
->
setAmoebaGlobalBondQuartic
(
quartic
);
// scale equilibrium bond lengths/force prefactor k
...
...
@@ -854,9 +854,9 @@ static int readAmoebaHarmonicBondParameters( FILE* filePtr, MapStringInt& forceM
if
(
log
){
static
const
unsigned
int
maxPrint
=
MAX_PRINT
;
unsigned
int
arraySize
=
static_cast
<
unsigned
int
>
(
bondForce
->
getNumBonds
());
(
void
)
fprintf
(
log
,
"%s: %u sample of Amoeba
Harmonic
BondForce parameters in %s units; cubic=%15.7e quartic=%15.7e
\n
"
,
(
void
)
fprintf
(
log
,
"%s: %u sample of AmoebaBondForce parameters in %s units; cubic=%15.7e quartic=%15.7e
\n
"
,
methodName
.
c_str
(),
arraySize
,
(
useOpenMMUnits
?
"OpenMM"
:
"Amoeba"
),
bondForce
->
getAmoebaGlobal
Harmonic
BondCubic
(),
bondForce
->
getAmoebaGlobal
Harmonic
BondQuartic
()
);
bondForce
->
getAmoebaGlobalBondCubic
(),
bondForce
->
getAmoebaGlobalBondQuartic
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
arraySize
;
ii
++
){
int
particle1
,
particle2
;
double
length
,
k
;
...
...
@@ -906,7 +906,7 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
throwException
(
__FILE__
,
__LINE__
,
buffer
);
}
Amoeba
Harmonic
AngleForce
*
angleForce
=
new
Amoeba
Harmonic
AngleForce
();
AmoebaAngleForce
*
angleForce
=
new
AmoebaAngleForce
();
MapStringIntI
forceActive
=
forceMap
.
find
(
AMOEBA_HARMONIC_ANGLE_FORCE
);
if
(
forceActive
!=
forceMap
.
end
()
&&
(
*
forceActive
).
second
){
system
.
addForce
(
angleForce
);
...
...
@@ -936,7 +936,7 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
angleForce
->
addAngle
(
particle1
,
particle2
,
particle3
,
angle
,
k
);
}
else
{
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"%s Amoeba
Harmonic
AngleForce tokens incomplete at line=%d
\n
"
,
methodName
.
c_str
(),
*
lineCount
);
(
void
)
sprintf
(
buffer
,
"%s AmoebaAngleForce tokens incomplete at line=%d
\n
"
,
methodName
.
c_str
(),
*
lineCount
);
(
void
)
fprintf
(
log
,
"%s"
,
buffer
);
throwException
(
__FILE__
,
__LINE__
,
buffer
);
}
...
...
@@ -960,16 +960,16 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
}
}
else
if
(
field
==
"AmoebaHarmonicAngleCubic"
){
angleForce
->
setAmoebaGlobal
Harmonic
AngleCubic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalAngleCubic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicAngleQuartic"
){
angleForce
->
setAmoebaGlobal
Harmonic
AngleQuartic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalAngleQuartic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicAnglePentic"
){
angleForce
->
setAmoebaGlobal
Harmonic
AnglePentic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalAnglePentic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicAngleSextic"
){
angleForce
->
setAmoebaGlobal
Harmonic
AngleSextic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalAngleSextic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
}
...
...
@@ -992,11 +992,11 @@ static int readAmoebaHarmonicAngleParameters( FILE* filePtr, MapStringInt& force
if
(
log
){
static
const
unsigned
int
maxPrint
=
MAX_PRINT
;
unsigned
int
arraySize
=
static_cast
<
unsigned
int
>
(
angleForce
->
getNumAngles
());
(
void
)
fprintf
(
log
,
"%s: %u sample of Amoeba
Harmonic
AngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e
\n
"
,
(
void
)
fprintf
(
log
,
"%s: %u sample of AmoebaAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e
\n
"
,
methodName
.
c_str
(),
arraySize
,
(
useOpenMMUnits
?
"OpenMM"
:
"Amoeba"
),
angleForce
->
getAmoebaGlobal
Harmonic
AngleCubic
(),
angleForce
->
getAmoebaGlobal
Harmonic
AngleQuartic
(),
angleForce
->
getAmoebaGlobal
Harmonic
AnglePentic
(),
angleForce
->
getAmoebaGlobal
Harmonic
AngleSextic
()
);
angleForce
->
getAmoebaGlobalAngleCubic
(),
angleForce
->
getAmoebaGlobalAngleQuartic
(),
angleForce
->
getAmoebaGlobalAnglePentic
(),
angleForce
->
getAmoebaGlobalAngleSextic
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
arraySize
;
ii
++
){
int
particle1
,
particle2
,
particle3
;
...
...
@@ -1048,7 +1048,7 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
throwException
(
__FILE__
,
__LINE__
,
buffer
);
}
Amoeba
Harmonic
InPlaneAngleForce
*
angleForce
=
new
Amoeba
Harmonic
InPlaneAngleForce
();
AmoebaInPlaneAngleForce
*
angleForce
=
new
AmoebaInPlaneAngleForce
();
MapStringIntI
forceActive
=
forceMap
.
find
(
AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE
);
if
(
forceActive
!=
forceMap
.
end
()
&&
(
*
forceActive
).
second
){
system
.
addForce
(
angleForce
);
...
...
@@ -1078,7 +1078,7 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
angleForce
->
addAngle
(
particle1
,
particle2
,
particle3
,
particle4
,
angle
,
k
);
}
else
{
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"%s Amoeba
Harmonic
InPlaneAngleForce tokens incomplete at line=%d
\n
"
,
methodName
.
c_str
(),
*
lineCount
);
(
void
)
sprintf
(
buffer
,
"%s AmoebaInPlaneAngleForce tokens incomplete at line=%d
\n
"
,
methodName
.
c_str
(),
*
lineCount
);
(
void
)
fprintf
(
log
,
"%s"
,
buffer
);
throwException
(
__FILE__
,
__LINE__
,
buffer
);
}
...
...
@@ -1101,16 +1101,16 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
}
}
else
if
(
field
==
"AmoebaHarmonicInPlaneAngleCubic"
){
angleForce
->
setAmoebaGlobal
Harmonic
InPlaneAngleCubic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalInPlaneAngleCubic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicInPlaneAngleQuartic"
){
angleForce
->
setAmoebaGlobal
Harmonic
InPlaneAngleQuartic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalInPlaneAngleQuartic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicInPlaneAnglePentic"
){
angleForce
->
setAmoebaGlobal
Harmonic
InPlaneAnglePentic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalInPlaneAnglePentic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
else
if
(
field
==
"AmoebaHarmonicInPlaneAngleSextic"
){
angleForce
->
setAmoebaGlobal
Harmonic
InPlaneAngleSextic
(
atof
(
tokens
[
1
].
c_str
()
)
);
angleForce
->
setAmoebaGlobalInPlaneAngleSextic
(
atof
(
tokens
[
1
].
c_str
()
)
);
hits
++
;
}
}
...
...
@@ -1133,12 +1133,12 @@ static int readAmoebaHarmonicInPlaneAngleParameters( FILE* filePtr, MapStringInt
if
(
log
){
static
const
unsigned
int
maxPrint
=
MAX_PRINT
;
unsigned
int
arraySize
=
static_cast
<
unsigned
int
>
(
angleForce
->
getNumAngles
());
(
void
)
fprintf
(
log
,
"%s: %u sample of Amoeba
Harmonic
InPlaneAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e
\n
"
,
(
void
)
fprintf
(
log
,
"%s: %u sample of AmoebaInPlaneAngleForce parameters in %s units; cubic=%15.7e quartic=%15.7e pentic=%15.7e sextic=%15.7e
\n
"
,
methodName
.
c_str
(),
arraySize
,
(
useOpenMMUnits
?
"OpenMM"
:
"Amoeba"
),
angleForce
->
getAmoebaGlobal
Harmonic
InPlaneAngleCubic
(),
angleForce
->
getAmoebaGlobal
Harmonic
InPlaneAngleQuartic
(),
angleForce
->
getAmoebaGlobal
Harmonic
InPlaneAnglePentic
(),
angleForce
->
getAmoebaGlobal
Harmonic
InPlaneAngleSextic
()
);
angleForce
->
getAmoebaGlobalInPlaneAngleCubic
(),
angleForce
->
getAmoebaGlobalInPlaneAngleQuartic
(),
angleForce
->
getAmoebaGlobalInPlaneAnglePentic
(),
angleForce
->
getAmoebaGlobalInPlaneAngleSextic
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
arraySize
;
ii
++
){
int
particle1
,
particle2
,
particle3
,
particle4
;
...
...
@@ -3452,7 +3452,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l
if
(
!
hit
){
try
{
Amoeba
Harmonic
BondForce
&
harmonicBondForce
=
dynamic_cast
<
Amoeba
Harmonic
BondForce
&>
(
force
);
AmoebaBondForce
&
harmonicBondForce
=
dynamic_cast
<
AmoebaBondForce
&>
(
force
);
forceMap
[
AMOEBA_HARMONIC_BOND_FORCE
]
=
&
force
;
hit
++
;
}
catch
(
std
::
bad_cast
){
...
...
@@ -3570,7 +3570,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l
if
(
!
hit
){
try
{
Amoeba
Harmonic
AngleForce
&
harmonicAngleForce
=
dynamic_cast
<
Amoeba
Harmonic
AngleForce
&>
(
force
);
AmoebaAngleForce
&
harmonicAngleForce
=
dynamic_cast
<
AmoebaAngleForce
&>
(
force
);
forceMap
[
AMOEBA_HARMONIC_ANGLE_FORCE
]
=
&
force
;
hit
++
;
}
catch
(
std
::
bad_cast
){
...
...
@@ -3582,7 +3582,7 @@ static void getStringForceMap( System& system, MapStringForce& forceMap, FILE* l
if
(
!
hit
){
try
{
Amoeba
Harmonic
InPlaneAngleForce
&
harmonicAngleForce
=
dynamic_cast
<
Amoeba
Harmonic
InPlaneAngleForce
&>
(
force
);
AmoebaInPlaneAngleForce
&
harmonicAngleForce
=
dynamic_cast
<
AmoebaInPlaneAngleForce
&>
(
force
);
forceMap
[
AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE
]
=
&
force
;
hit
++
;
}
catch
(
std
::
bad_cast
){
...
...
@@ -3737,7 +3737,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS
}
else
if
(
field
==
"AmoebaHarmonicBondParameters"
){
readAmoebaHarmonicBondParameters
(
filePtr
,
forceMap
,
tokens
,
system
,
useOpenMMUnits
,
inputArgumentMap
,
&
lineCount
,
log
);
}
else
if
(
field
==
"Amoeba
Harmonic
BondForce"
){
}
else
if
(
field
==
"AmoebaBondForce"
){
readVec3
(
filePtr
,
tokens
,
forces
[
AMOEBA_HARMONIC_BOND_FORCE
],
&
lineCount
,
field
,
log
);
}
else
if
(
field
==
"AmoebaHarmonicBondEnergy"
){
if
(
tokens
.
size
()
>
1
){
...
...
@@ -3759,7 +3759,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS
}
else
if
(
field
==
"AmoebaHarmonicAngleParameters"
){
readAmoebaHarmonicAngleParameters
(
filePtr
,
forceMap
,
tokens
,
system
,
useOpenMMUnits
,
inputArgumentMap
,
&
lineCount
,
log
);
}
else
if
(
field
==
"Amoeba
Harmonic
AngleForce"
){
}
else
if
(
field
==
"AmoebaAngleForce"
){
readVec3
(
filePtr
,
tokens
,
forces
[
AMOEBA_HARMONIC_ANGLE_FORCE
],
&
lineCount
,
field
,
log
);
}
else
if
(
field
==
"AmoebaHarmonicAngleEnergy"
){
if
(
tokens
.
size
()
>
1
){
...
...
@@ -3770,7 +3770,7 @@ Integrator* readAmoebaParameterFile( const std::string& inputParameterFile, MapS
}
else
if
(
field
==
"AmoebaHarmonicInPlaneAngleParameters"
){
readAmoebaHarmonicInPlaneAngleParameters
(
filePtr
,
forceMap
,
tokens
,
system
,
useOpenMMUnits
,
inputArgumentMap
,
&
lineCount
,
log
);
}
else
if
(
field
==
"Amoeba
Harmonic
InPlaneAngleForce"
){
}
else
if
(
field
==
"AmoebaInPlaneAngleForce"
){
readVec3
(
filePtr
,
tokens
,
forces
[
AMOEBA_HARMONIC_IN_PLANE_ANGLE_FORCE
],
&
lineCount
,
field
,
log
);
}
else
if
(
field
==
"AmoebaHarmonicInPlaneAngleEnergy"
){
if
(
tokens
.
size
()
>
1
){
...
...
plugins/amoeba/platforms/cuda-old/tests/AmoebaTinkerParameterFile.h
View file @
c6ebf6e2
...
...
@@ -35,9 +35,9 @@
#include "openmm/VariableVerletIntegrator.h"
#include "openmm/BrownianIntegrator.h"
#include "openmm/Amoeba
Harmonic
BondForce.h"
#include "openmm/Amoeba
Harmonic
AngleForce.h"
#include "openmm/Amoeba
Harmonic
InPlaneAngleForce.h"
#include "openmm/AmoebaBondForce.h"
#include "openmm/AmoebaAngleForce.h"
#include "openmm/AmoebaInPlaneAngleForce.h"
#include "openmm/AmoebaTorsionForce.h"
#include "openmm/AmoebaPiTorsionForce.h"
#include "openmm/AmoebaStretchBendForce.h"
...
...
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