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
458f19f3
Commit
458f19f3
authored
Aug 14, 2019
by
Michael Schnieders
Browse files
Proof of concept API changes to support softcore AMOEBA vdW interactions
parent
a34bb184
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
5 deletions
+71
-5
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
+71
-5
No files found.
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
View file @
458f19f3
...
...
@@ -70,6 +70,21 @@ public:
CutoffPeriodic
=
1
,
};
/**
* This is an enumeration of the different alchemical methods used when applying softcore interactions.
*/
enum
AlchemicalMethod
{
/**
* Maintain full strength vdW interactions between two alchemical particles. This is the default.
*/
Decouple
=
0
,
/**
* Interactions between two alchemical particles are turned off at lambda=0.
*/
Annihilate
=
1
,
};
/**
* Create an Amoeba VdwForce.
*/
...
...
@@ -91,8 +106,9 @@ public:
* @param epsilon vdw epsilon
* @param reductionFactor the fraction of the distance along the line from the parent particle to this particle
* at which the interaction site should be placed
* @param isAlchemical if true, this vdW particle is undergoing an alchemical change.
*/
void
setParticleParameters
(
int
particleIndex
,
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
);
void
setParticleParameters
(
int
particleIndex
,
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
,
bool
isAlchemical
);
/**
* Get the force field parameters for a vdw particle.
...
...
@@ -103,8 +119,11 @@ public:
* @param[out] epsilon vdw epsilon
* @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
* @param[out] isAlchemical if true, this vdW particle is undergoing an alchemical change.
*/
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
,
bool
&
isAlchemical
)
const
;
/**
...
...
@@ -115,9 +134,10 @@ public:
* @param epsilon vdw epsilon
* @param reductionFactor the fraction of the distance along the line from the parent particle to this particle
* at which the interaction site should be placed
* @param isAlchemical if true, this vdW particle is undergoing an alchemical change.
* @return index of added particle
*/
int
addParticle
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
);
int
addParticle
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
,
bool
isAlchemical
);
/**
* Set sigma combining rule
...
...
@@ -223,6 +243,47 @@ public:
* Set the method used for handling long range nonbonded interactions.
*/
void
setNonbondedMethod
(
NonbondedMethod
method
);
/**
* Set the vdw Lambda value.
*/
void
setLambda
(
double
lambda
);
/**
* Get the vdw Lambda value.
*/
double
getLambda
()
const
;
/**
* Set the softcore power on lambda.
*/
void
setN
(
double
n
);
/**
* Get the softcore power on lambda.
*/
double
getN
()
const
;
/**
* Set the softcore alpha value.
*/
void
setAlpha
(
double
alpha
);
/**
* Get the softcore alpha value.
*/
double
getAlpha
()
const
;
/**
* Get the method used for alchemical interactions.
*/
AlchemicalMethod
getAlchemicalMethod
()
const
;
/**
* Set the method used for handling long range nonbonded interactions.
*/
void
setAlchemicalMethod
(
AlchemicalMethod
method
);
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
...
@@ -250,6 +311,9 @@ private:
NonbondedMethod
nonbondedMethod
;
double
cutoff
;
bool
useDispersionCorrection
;
double
amoebaVdwLambda
;
int
n
;
double
alpha
;
std
::
string
sigmaCombiningRule
;
std
::
string
epsilonCombiningRule
;
...
...
@@ -267,14 +331,16 @@ class AmoebaVdwForce::VdwInfo {
public:
int
parentIndex
;
double
reductionFactor
,
sigma
,
epsilon
,
cutoff
;
bool
isAlchemical
;
VdwInfo
()
{
parentIndex
=
-
1
;
reductionFactor
=
0.0
;
sigma
=
1.0
;
epsilon
=
0.0
;
isAlchemical
=
false
;
}
VdwInfo
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
)
:
parentIndex
(
parentIndex
),
reductionFactor
(
reductionFactor
),
sigma
(
sigma
),
epsilon
(
epsilon
)
{
VdwInfo
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
,
bool
isAlchemical
)
:
parentIndex
(
parentIndex
),
reductionFactor
(
reductionFactor
),
sigma
(
sigma
),
epsilon
(
epsilon
)
,
isAlchemical
(
isAlchemical
)
{
}
};
...
...
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