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
b7a24d6c
Commit
b7a24d6c
authored
Jun 01, 2013
by
Lee-Ping
Browse files
Removed duplicate kernels, slightly modified API for Python compatibility.
parent
8d956093
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
27 additions
and
139 deletions
+27
-139
olla/include/openmm/kernels.h
olla/include/openmm/kernels.h
+1
-40
openmmapi/include/openmm/MonteCarloBarostat.h
openmmapi/include/openmm/MonteCarloBarostat.h
+8
-7
openmmapi/include/openmm/internal/MonteCarloBarostatImpl.h
openmmapi/include/openmm/internal/MonteCarloBarostatImpl.h
+0
-1
openmmapi/src/MonteCarloBarostat.cpp
openmmapi/src/MonteCarloBarostat.cpp
+2
-2
openmmapi/src/MonteCarloBarostatImpl.cpp
openmmapi/src/MonteCarloBarostatImpl.cpp
+5
-5
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+1
-8
platforms/cuda/src/CudaKernels.h
platforms/cuda/src/CudaKernels.h
+1
-24
platforms/cuda/tests/TestCudaMonteCarloBarostat.cpp
platforms/cuda/tests/TestCudaMonteCarloBarostat.cpp
+2
-2
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+1
-1
platforms/opencl/src/OpenCLKernels.h
platforms/opencl/src/OpenCLKernels.h
+1
-24
platforms/opencl/tests/TestOpenCLMonteCarloBarostat.cpp
platforms/opencl/tests/TestOpenCLMonteCarloBarostat.cpp
+2
-2
platforms/reference/src/ReferenceKernels.cpp
platforms/reference/src/ReferenceKernels.cpp
+1
-4
platforms/reference/src/ReferenceKernels.h
platforms/reference/src/ReferenceKernels.h
+1
-17
platforms/reference/tests/TestReferenceMonteCarloBarostat.cpp
...forms/reference/tests/TestReferenceMonteCarloBarostat.cpp
+1
-1
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+0
-1
No files found.
olla/include/openmm/kernels.h
View file @
b7a24d6c
...
...
@@ -1107,46 +1107,7 @@ public:
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloBarostat this kernel will be used for
*/
virtual
void
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
barostat
)
=
0
;
/**
* Attempt a Monte Carlo step, scaling particle positions (or cluster centers) by a specified value.
* This version scales the x, y, and z positions independently.
* This is called BEFORE the periodic box size is modified. It should begin by translating each particle
* or cluster into the first periodic box, so that coordinates will still be correct after the box size
* is changed.
*
* @param context the context in which to execute this kernel
* @param scaleX the scale factor by which to multiply particle x-coordinate
* @param scaleY the scale factor by which to multiply particle y-coordinate
* @param scaleZ the scale factor by which to multiply particle z-coordinate
*/
virtual
void
scaleCoordinates
(
ContextImpl
&
context
,
double
scaleX
,
double
scaleY
,
double
scaleZ
)
=
0
;
/**
* Reject the most recent Monte Carlo step, restoring the particle positions to where they were before
* scaleCoordinates() was last called.
*
* @param context the context in which to execute this kernel
*/
virtual
void
restoreCoordinates
(
ContextImpl
&
context
)
=
0
;
};
/**
* This kernel is invoked by MonteCarloAnisotropicBarostat to adjust the periodic box volume
*/
class
ApplyMonteCarloAnisotropicBarostatKernel
:
public
KernelImpl
{
public:
static
std
::
string
Name
()
{
return
"ApplyMonteCarloAnisotropicBarostat"
;
}
ApplyMonteCarloAnisotropicBarostatKernel
(
std
::
string
name
,
const
Platform
&
platform
)
:
KernelImpl
(
name
,
platform
)
{
}
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloAnisotropicBarostat this kernel will be used for
*/
virtual
void
initialize
(
const
System
&
system
,
const
MonteCarloAnisotropicBarostat
&
barostat
)
=
0
;
virtual
void
initialize
(
const
System
&
system
,
const
Force
&
barostat
)
=
0
;
/**
* Attempt a Monte Carlo step, scaling particle positions (or cluster centers) by a specified value.
* This version scales the x, y, and z positions independently.
...
...
openmmapi/include/openmm/MonteCarloBarostat.h
View file @
b7a24d6c
...
...
@@ -35,7 +35,6 @@
#include "Force.h"
#include <string>
#include "internal/windowsExport.h"
#include "Vec3.h"
namespace
OpenMM
{
...
...
@@ -176,21 +175,23 @@ public:
/**
* Create a MonteCarloAnisotropicBarostat.
*
* @param defaultPressure 3-element vector specifying the default pressure acting on each axis (in bar)
* @param defaultPressureX The default pressure acting on the X-axis (in bar)
* @param defaultPressureY The default pressure acting on the Y-axis (in bar)
* @param defaultPressureZ The default pressure acting on the Z-axis (in bar)
* @param temperature the temperature at which the system is being maintained (in Kelvin)
* @param frequency the frequency at which Monte Carlo pressure changes should be attempted (in time steps)
* @param scaleX on/off switch for whether to scale the X axis
* @param scaleY on/off switch for whether to scale the Y axis
* @param scaleZ on/off switch for whether to scale the Z axis
*/
MonteCarloAnisotropicBarostat
(
Vec3
defaultPressure
,
double
temperature
,
int
frequency
=
25
,
bool
scaleX
=
1
,
bool
scaleY
=
1
,
bool
scaleZ
=
1
);
MonteCarloAnisotropicBarostat
(
double
defaultPressureX
,
double
defaultPressureY
,
double
defaultPressure
Z
,
double
temperature
,
int
frequency
=
25
,
bool
scaleX
=
1
,
bool
scaleY
=
1
,
bool
scaleZ
=
1
);
/**
* Get the default pressure acting on the X-axis (in bar).
*
* @return the default pressure acting on the system, measured in bar.
*/
double
getDefaultPressureX
()
const
{
return
defaultPressure
[
0
]
;
return
defaultPressure
X
;
}
/**
* Get the default pressure acting on the Y-axis (in bar).
...
...
@@ -198,7 +199,7 @@ public:
* @return the default pressure acting on the system, measured in bar.
*/
double
getDefaultPressureY
()
const
{
return
defaultPressure
[
1
]
;
return
defaultPressure
Y
;
}
/**
* Get the default pressure acting on the Z-axis (in bar).
...
...
@@ -206,7 +207,7 @@ public:
* @return the default pressure acting on the system, measured in bar.
*/
double
getDefaultPressureZ
()
const
{
return
defaultPressure
[
2
]
;
return
defaultPressure
Z
;
}
/**
* Get the true/false flag for scaling the X-axis.
...
...
@@ -279,7 +280,7 @@ public:
protected:
ForceImpl
*
createImpl
()
const
;
private:
Vec3
defaultPressure
;
double
defaultPressureX
,
defaultPressureY
,
defaultPressure
Z
;
double
temperature
;
bool
scaleX
,
scaleY
,
scaleZ
;
int
frequency
,
randomNumberSeed
;
...
...
openmmapi/include/openmm/internal/MonteCarloBarostatImpl.h
View file @
b7a24d6c
...
...
@@ -35,7 +35,6 @@
#include "ForceImpl.h"
#include "openmm/MonteCarloBarostat.h"
#include "openmm/Kernel.h"
#include "openmm/Vec3.h"
#include "sfmt/SFMT.h"
#include <string>
...
...
openmmapi/src/MonteCarloBarostat.cpp
View file @
b7a24d6c
...
...
@@ -44,8 +44,8 @@ ForceImpl* MonteCarloBarostat::createImpl() const {
return
new
MonteCarloBarostatImpl
(
*
this
);
}
MonteCarloAnisotropicBarostat
::
MonteCarloAnisotropicBarostat
(
Vec3
defaultPressure
,
double
temperature
,
int
frequency
,
bool
scaleX
,
bool
scaleY
,
bool
scaleZ
)
:
defaultPressure
(
defaultPressure
),
temperature
(
temperature
),
frequency
(
frequency
),
scaleX
(
scaleX
),
scaleY
(
scaleY
),
scaleZ
(
scaleZ
)
{
MonteCarloAnisotropicBarostat
::
MonteCarloAnisotropicBarostat
(
double
defaultPressureX
,
double
defaultPressureY
,
double
defaultPressure
Z
,
double
temperature
,
int
frequency
,
bool
scaleX
,
bool
scaleY
,
bool
scaleZ
)
:
defaultPressure
X
(
defaultPressure
X
),
defaultPressureY
(
defaultPressureY
),
defaultPressureZ
(
defaultPressureZ
),
temperature
(
temperature
),
frequency
(
frequency
),
scaleX
(
scaleX
),
scaleY
(
scaleY
),
scaleZ
(
scaleZ
)
{
setRandomNumberSeed
((
int
)
time
(
NULL
));
}
...
...
openmmapi/src/MonteCarloBarostatImpl.cpp
View file @
b7a24d6c
...
...
@@ -126,8 +126,8 @@ MonteCarloAnisotropicBarostatImpl::MonteCarloAnisotropicBarostatImpl(const Monte
}
void
MonteCarloAnisotropicBarostatImpl
::
initialize
(
ContextImpl
&
context
)
{
kernel
=
context
.
getPlatform
().
createKernel
(
ApplyMonteCarlo
Anisotropic
BarostatKernel
::
Name
(),
context
);
kernel
.
getAs
<
ApplyMonteCarlo
Anisotropic
BarostatKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
kernel
=
context
.
getPlatform
().
createKernel
(
ApplyMonteCarloBarostatKernel
::
Name
(),
context
);
kernel
.
getAs
<
ApplyMonteCarloBarostatKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
Vec3
box
[
3
];
context
.
getPeriodicBoxVectors
(
box
[
0
],
box
[
1
],
box
[
2
]);
double
volume
=
box
[
0
][
0
]
*
box
[
1
][
1
]
*
box
[
2
][
2
];
...
...
@@ -181,7 +181,7 @@ void MonteCarloAnisotropicBarostatImpl::updateContextState(ContextImpl& context)
for
(
int
i
=
0
;
i
<
3
;
i
++
)
lengthScale
[
i
]
=
1.0
;
lengthScale
[
axis
]
=
newVolume
/
volume
;
kernel
.
getAs
<
ApplyMonteCarlo
Anisotropic
BarostatKernel
>
().
scaleCoordinates
(
context
,
lengthScale
[
0
],
lengthScale
[
1
],
lengthScale
[
2
]);
kernel
.
getAs
<
ApplyMonteCarloBarostatKernel
>
().
scaleCoordinates
(
context
,
lengthScale
[
0
],
lengthScale
[
1
],
lengthScale
[
2
]);
context
.
getOwner
().
setPeriodicBoxVectors
(
box
[
0
]
*
lengthScale
[
0
],
box
[
1
]
*
lengthScale
[
1
],
box
[
2
]
*
lengthScale
[
2
]);
// Compute the energy of the modified system.
...
...
@@ -192,7 +192,7 @@ void MonteCarloAnisotropicBarostatImpl::updateContextState(ContextImpl& context)
if
(
w
>
0
&&
genrand_real2
(
random
)
>
std
::
exp
(
-
w
/
kT
))
{
// Reject the step.
kernel
.
getAs
<
ApplyMonteCarlo
Anisotropic
BarostatKernel
>
().
restoreCoordinates
(
context
);
kernel
.
getAs
<
ApplyMonteCarloBarostatKernel
>
().
restoreCoordinates
(
context
);
context
.
getOwner
().
setPeriodicBoxVectors
(
box
[
0
],
box
[
1
],
box
[
2
]);
volume
=
newVolume
;
}
...
...
@@ -223,7 +223,7 @@ std::map<std::string, double> MonteCarloAnisotropicBarostatImpl::getDefaultParam
std
::
vector
<
std
::
string
>
MonteCarloAnisotropicBarostatImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
names
.
push_back
(
ApplyMonteCarlo
Anisotropic
BarostatKernel
::
Name
());
names
.
push_back
(
ApplyMonteCarloBarostatKernel
::
Name
());
return
names
;
}
platforms/cuda/src/CudaKernels.cpp
View file @
b7a24d6c
...
...
@@ -5310,7 +5310,7 @@ CudaApplyMonteCarloBarostatKernel::~CudaApplyMonteCarloBarostatKernel() {
delete
moleculeStartIndex
;
}
void
CudaApplyMonteCarloBarostatKernel
::
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
thermostat
)
{
void
CudaApplyMonteCarloBarostatKernel
::
initialize
(
const
System
&
system
,
const
Force
&
thermostat
)
{
cu
.
setAsCurrent
();
savedPositions
=
new
CudaArray
(
cu
,
cu
.
getPaddedNumAtoms
(),
cu
.
getUseDoublePrecision
()
?
sizeof
(
double4
)
:
sizeof
(
float4
),
"savedPositions"
);
CUmodule
module
=
cu
.
createModule
(
CudaKernelSources
::
monteCarloBarostat
);
...
...
@@ -5372,13 +5372,6 @@ void CudaApplyMonteCarloBarostatKernel::restoreCoordinates(ContextImpl& context)
}
}
void
CudaApplyMonteCarloAnisotropicBarostatKernel
::
initialize
(
const
System
&
system
,
const
MonteCarloAnisotropicBarostat
&
thermostat
)
{
cu
.
setAsCurrent
();
savedPositions
=
new
CudaArray
(
cu
,
cu
.
getPaddedNumAtoms
(),
cu
.
getUseDoublePrecision
()
?
sizeof
(
double4
)
:
sizeof
(
float4
),
"savedPositions"
);
CUmodule
module
=
cu
.
createModule
(
CudaKernelSources
::
monteCarloBarostat
);
kernel
=
cu
.
getKernel
(
module
,
"scalePositions"
);
}
CudaRemoveCMMotionKernel
::~
CudaRemoveCMMotionKernel
()
{
cu
.
setAsCurrent
();
if
(
cmMomentum
!=
NULL
)
...
...
platforms/cuda/src/CudaKernels.h
View file @
b7a24d6c
...
...
@@ -1254,7 +1254,7 @@ public:
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloBarostat this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
barostat
);
void
initialize
(
const
System
&
system
,
const
Force
&
barostat
);
/**
* Attempt a Monte Carlo step, scaling particle positions (or cluster centers) by a specified value.
* This version scales the x, y, and z positions independently.
...
...
@@ -1286,29 +1286,6 @@ private:
std
::
vector
<
int
>
lastAtomOrder
;
};
/**
* This kernel is invoked by MonteCarloAnisotropicBarostat to adjust the periodic box volume
*/
class
CudaApplyMonteCarloAnisotropicBarostatKernel
:
public
CudaApplyMonteCarloBarostatKernel
{
public:
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloAnisotropicBarostat this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
MonteCarloAnisotropicBarostat
&
barostat
);
private:
CudaContext
&
cu
;
bool
hasInitializedKernels
;
int
numMolecules
;
CudaArray
*
savedPositions
;
CudaArray
*
moleculeAtoms
;
CudaArray
*
moleculeStartIndex
;
CUfunction
kernel
;
std
::
vector
<
int
>
lastAtomOrder
;
};
/**
* This kernel is invoked to remove center of mass motion from the system.
*/
...
...
platforms/cuda/tests/TestCudaMonteCarloBarostat.cpp
View file @
b7a24d6c
...
...
@@ -112,7 +112,7 @@ void testIdealGas(int aniso) {
}
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
[
0
],
frequency
);
if
(
aniso
)
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
)
,
temp
[
0
],
frequency
);
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
pressure
,
pressure
,
pressure
,
temp
[
0
],
frequency
);
system
.
addForce
(
barostat
);
// Test it for three different temperatures.
...
...
@@ -256,7 +256,7 @@ void testWater(int aniso) {
system
.
addForce
(
nonbonded
);
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
,
frequency
);
if
(
aniso
)
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
)
,
temp
,
frequency
);
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
pressure
,
pressure
,
pressure
,
temp
,
frequency
);
system
.
addForce
(
barostat
);
// Simulate it and see if the density matches the expected value (1 g/mL).
...
...
platforms/opencl/src/OpenCLKernels.cpp
View file @
b7a24d6c
...
...
@@ -5536,7 +5536,7 @@ OpenCLApplyMonteCarloBarostatKernel::~OpenCLApplyMonteCarloBarostatKernel() {
delete
moleculeStartIndex
;
}
void
OpenCLApplyMonteCarloBarostatKernel
::
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
thermostat
)
{
void
OpenCLApplyMonteCarloBarostatKernel
::
initialize
(
const
System
&
system
,
const
Force
&
thermostat
)
{
savedPositions
=
OpenCLArray
::
create
<
mm_float4
>
(
cl
,
cl
.
getPaddedNumAtoms
(),
"savedPositions"
);
cl
::
Program
program
=
cl
.
createProgram
(
OpenCLKernelSources
::
monteCarloBarostat
);
kernel
=
cl
::
Kernel
(
program
,
"scalePositions"
);
...
...
platforms/opencl/src/OpenCLKernels.h
View file @
b7a24d6c
...
...
@@ -1268,7 +1268,7 @@ public:
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloBarostat this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
barostat
);
void
initialize
(
const
System
&
system
,
const
Force
&
barostat
);
/**
* Attempt a Monte Carlo step, scaling particle positions (or cluster centers) by a specified value.
* This version scales the x, y, and z positions independently.
...
...
@@ -1300,29 +1300,6 @@ private:
std
::
vector
<
int
>
lastAtomOrder
;
};
/**
* This kernel is invoked by MonteCarloAnisotropicBarostat to adjust the periodic box volume
*/
class
OpenCLApplyMonteCarloAnisotropicBarostatKernel
:
public
OpenCLApplyMonteCarloBarostatKernel
{
public:
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloAnisotropicBarostat this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
MonteCarloAnisotropicBarostat
&
barostat
);
private:
OpenCLContext
&
cl
;
bool
hasInitializedKernels
;
int
numMolecules
;
OpenCLArray
*
savedPositions
;
OpenCLArray
*
moleculeAtoms
;
OpenCLArray
*
moleculeStartIndex
;
cl
::
Kernel
kernel
;
std
::
vector
<
int
>
lastAtomOrder
;
};
/**
* This kernel is invoked to remove center of mass motion from the system.
*/
...
...
platforms/opencl/tests/TestOpenCLMonteCarloBarostat.cpp
View file @
b7a24d6c
...
...
@@ -112,7 +112,7 @@ void testIdealGas(int aniso) {
}
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
[
0
],
frequency
);
if
(
aniso
)
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
)
,
temp
[
0
],
frequency
);
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
pressure
,
pressure
,
pressure
,
temp
[
0
],
frequency
);
system
.
addForce
(
barostat
);
// Test it for three different temperatures.
...
...
@@ -259,7 +259,7 @@ void testWater(int aniso) {
system
.
addForce
(
nonbonded
);
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
,
frequency
);
if
(
aniso
)
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
)
,
temp
,
frequency
);
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
pressure
,
pressure
,
pressure
,
temp
,
frequency
);
system
.
addForce
(
barostat
);
// Simulate it and see if the density matches the expected value (1 g/mL).
...
...
platforms/reference/src/ReferenceKernels.cpp
View file @
b7a24d6c
...
...
@@ -2140,7 +2140,7 @@ ReferenceApplyMonteCarloBarostatKernel::~ReferenceApplyMonteCarloBarostatKernel(
delete
barostat
;
}
void
ReferenceApplyMonteCarloBarostatKernel
::
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
barostat
)
{
void
ReferenceApplyMonteCarloBarostatKernel
::
initialize
(
const
System
&
system
,
const
Force
&
barostat
)
{
}
void
ReferenceApplyMonteCarloBarostatKernel
::
scaleCoordinates
(
ContextImpl
&
context
,
double
scaleX
,
double
scaleY
,
double
scaleZ
)
{
...
...
@@ -2156,9 +2156,6 @@ void ReferenceApplyMonteCarloBarostatKernel::restoreCoordinates(ContextImpl& con
barostat
->
restorePositions
(
posData
);
}
void
ReferenceApplyMonteCarloAnisotropicBarostatKernel
::
initialize
(
const
System
&
system
,
const
MonteCarloAnisotropicBarostat
&
barostat
)
{
}
void
ReferenceRemoveCMMotionKernel
::
initialize
(
const
System
&
system
,
const
CMMotionRemover
&
force
)
{
frequency
=
force
.
getFrequency
();
masses
.
resize
(
system
.
getNumParticles
());
...
...
platforms/reference/src/ReferenceKernels.h
View file @
b7a24d6c
...
...
@@ -1182,7 +1182,7 @@ public:
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloBarostat this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
MonteCarloBarostat
&
barostat
);
void
initialize
(
const
System
&
system
,
const
Force
&
barostat
);
/**
* Attempt a Monte Carlo step, scaling particle positions (or cluster centers) by a specified value.
* This version scales the x, y, and z positions independently.
...
...
@@ -1207,22 +1207,6 @@ private:
ReferenceMonteCarloBarostat
*
barostat
;
};
/**
* This kernel is invoked by MonteCarloAnisotropicBarostat to adjust the periodic box volume
*/
class
ReferenceApplyMonteCarloAnisotropicBarostatKernel
:
public
ReferenceApplyMonteCarloBarostatKernel
{
public:
/**
* Initialize the kernel.
*
* @param system the System this kernel will be applied to
* @param barostat the MonteCarloAnisotropicBarostat this kernel will be used for
*/
void
initialize
(
const
System
&
system
,
const
MonteCarloAnisotropicBarostat
&
barostat
);
private:
ReferenceMonteCarloBarostat
*
barostat
;
};
/**
* This kernel is invoked to remove center of mass motion from the system.
*/
...
...
platforms/reference/tests/TestReferenceMonteCarloBarostat.cpp
View file @
b7a24d6c
...
...
@@ -112,7 +112,7 @@ void testIdealGas(int aniso) {
}
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
[
0
],
frequency
);
if
(
aniso
)
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
)
,
temp
[
0
],
frequency
);
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
pressure
,
pressure
,
pressure
,
temp
[
0
],
frequency
);
system
.
addForce
(
barostat
);
// Test it for three different temperatures.
...
...
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
b7a24d6c
...
...
@@ -32,7 +32,6 @@ SKIP_METHODS = [('State',),
(
'ApplyAndersenThermostatKernel'
,),
(
'ApplyConstraintsKernel'
,),
(
'ApplyMonteCarloBarostatKernel'
,),
(
'ApplyMonteCarloAnisotropicBarostatKernel'
,),
(
'BondInfo'
,),
(
'BondParameterInfo'
,),
(
'CalcAmoebaGeneralizedKirkwoodForceKernel'
,),
...
...
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