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
71d33617
Commit
71d33617
authored
Apr 24, 2015
by
John Chodera (MSKCC)
Browse files
Merge remote-tracking branch 'upstream/master'
parents
eb232608
9da36463
Changes
127
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
65 additions
and
24 deletions
+65
-24
CMakeLists.txt
CMakeLists.txt
+6
-4
olla/include/openmm/kernels.h
olla/include/openmm/kernels.h
+8
-1
openmmapi/include/openmm/CMAPTorsionForce.h
openmmapi/include/openmm/CMAPTorsionForce.h
+12
-1
openmmapi/include/openmm/CustomAngleForce.h
openmmapi/include/openmm/CustomAngleForce.h
+1
-1
openmmapi/include/openmm/CustomBondForce.h
openmmapi/include/openmm/CustomBondForce.h
+1
-1
openmmapi/include/openmm/CustomCompoundBondForce.h
openmmapi/include/openmm/CustomCompoundBondForce.h
+1
-1
openmmapi/include/openmm/CustomExternalForce.h
openmmapi/include/openmm/CustomExternalForce.h
+1
-1
openmmapi/include/openmm/CustomGBForce.h
openmmapi/include/openmm/CustomGBForce.h
+1
-1
openmmapi/include/openmm/CustomHbondForce.h
openmmapi/include/openmm/CustomHbondForce.h
+1
-1
openmmapi/include/openmm/CustomTorsionForce.h
openmmapi/include/openmm/CustomTorsionForce.h
+1
-1
openmmapi/include/openmm/GBSAOBCForce.h
openmmapi/include/openmm/GBSAOBCForce.h
+1
-1
openmmapi/include/openmm/HarmonicAngleForce.h
openmmapi/include/openmm/HarmonicAngleForce.h
+1
-1
openmmapi/include/openmm/HarmonicBondForce.h
openmmapi/include/openmm/HarmonicBondForce.h
+1
-1
openmmapi/include/openmm/NonbondedForce.h
openmmapi/include/openmm/NonbondedForce.h
+1
-1
openmmapi/include/openmm/PeriodicTorsionForce.h
openmmapi/include/openmm/PeriodicTorsionForce.h
+1
-1
openmmapi/include/openmm/RBTorsionForce.h
openmmapi/include/openmm/RBTorsionForce.h
+1
-1
openmmapi/include/openmm/internal/CMAPTorsionForceImpl.h
openmmapi/include/openmm/internal/CMAPTorsionForceImpl.h
+2
-1
openmmapi/include/openmm/internal/vectorize8.h
openmmapi/include/openmm/internal/vectorize8.h
+12
-0
openmmapi/include/openmm/internal/vectorize_neon.h
openmmapi/include/openmm/internal/vectorize_neon.h
+6
-2
openmmapi/include/openmm/internal/vectorize_pnacl.h
openmmapi/include/openmm/internal/vectorize_pnacl.h
+6
-2
No files found.
CMakeLists.txt
View file @
71d33617
...
...
@@ -296,7 +296,9 @@ SET(OPENMM_BUILD_SHARED_LIB ON CACHE BOOL "Whether to build shared OpenMM librar
SET
(
EXTRA_LINK_FLAGS
${
EXTRA_COMPILE_FLAGS
}
)
IF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
SET
(
EXTRA_LINK_FLAGS
"
${
EXTRA_LINK_FLAGS
}
-Wl,--no-as-needed -lrt"
)
IF
(
NOT ANDROID
)
SET
(
EXTRA_LINK_FLAGS
"
${
EXTRA_LINK_FLAGS
}
-Wl,--no-as-needed -lrt"
)
ENDIF
(
NOT ANDROID
)
ENDIF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
IF
(
OPENMM_BUILD_SHARED_LIB
)
...
...
@@ -403,11 +405,11 @@ MARK_AS_ADVANCED(CUDA_BUILD_CUBIN)
MARK_AS_ADVANCED
(
CUDA_BUILD_EMULATION
)
FIND_PACKAGE
(
OpenCL QUIET
)
IF
(
OPENCL_FOUND
AND NOT APPLE
)
IF
(
OPENCL_FOUND
)
SET
(
OPENMM_BUILD_OPENCL_LIB ON CACHE BOOL
"Build OpenMMOpenCL library"
)
ELSE
(
OPENCL_FOUND
AND NOT APPLE
)
ELSE
(
OPENCL_FOUND
)
SET
(
OPENMM_BUILD_OPENCL_LIB OFF CACHE BOOL
"Build OpenMMOpenCL library"
)
ENDIF
(
OPENCL_FOUND
AND NOT APPLE
)
ENDIF
(
OPENCL_FOUND
)
IF
(
OPENMM_BUILD_OPENCL_LIB
)
ADD_SUBDIRECTORY
(
platforms/opencl
)
ENDIF
(
OPENMM_BUILD_OPENCL_LIB
)
...
...
olla/include/openmm/kernels.h
View file @
71d33617
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
5
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -494,6 +494,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the CMAPTorsionForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CMAPTorsionForce
&
force
)
=
0
;
};
/**
...
...
openmmapi/include/openmm/CMAPTorsionForce.h
View file @
71d33617
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2010 Stanford University and the Authors.
*
* Portions copyright (c) 2010
-2015
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -148,6 +148,17 @@ public:
* @param b4 the index of the fourth particle forming the second torsion
*/
void
setTorsionParameters
(
int
index
,
int
map
,
int
a1
,
int
a2
,
int
a3
,
int
a4
,
int
b1
,
int
b2
,
int
b3
,
int
b4
);
/**
* Update the map and torsion 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.
* Simply call setMapParameters() and setTorsionParameters() to modify this object's parameters, then call updateParametersInContext()
* to copy them over to the Context.
*
* The only information that can be updated with this method is the energy values for a map, and the map index
* for a torsion. The size of a map and the set of particles involved in a torsion cannot be changed. Also,
* new bonds and torsions cannot be added.
*/
void
updateParametersInContext
(
Context
&
context
);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
...
...
openmmapi/include/openmm/CustomAngleForce.h
View file @
71d33617
...
...
@@ -194,7 +194,7 @@ public:
/**
* Update the per-angle 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.
* Simply call setAngleParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setAngleParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-angle parameters.
...
...
openmmapi/include/openmm/CustomBondForce.h
View file @
71d33617
...
...
@@ -191,7 +191,7 @@ public:
/**
* Update the per-bond 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.
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-bond parameters.
...
...
openmmapi/include/openmm/CustomCompoundBondForce.h
View file @
71d33617
...
...
@@ -289,7 +289,7 @@ public:
/**
* Update the per-bond 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.
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-bond parameters.
...
...
openmmapi/include/openmm/CustomExternalForce.h
View file @
71d33617
...
...
@@ -191,7 +191,7 @@ public:
/**
* 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.
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-particle parameters.
...
...
openmmapi/include/openmm/CustomGBForce.h
View file @
71d33617
...
...
@@ -515,7 +515,7 @@ public:
/**
* 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.
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-particle parameters.
...
...
openmmapi/include/openmm/CustomHbondForce.h
View file @
71d33617
...
...
@@ -435,7 +435,7 @@ public:
* Update the per-donor and per-acceptor 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.
* Simply call setDonorParameters() and setAcceptorParameters() to modify this object's parameters, then call
* updateParametersIn
State
() to copy them over to the Context.
* updateParametersIn
Context
() to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-donor and per-acceptor parameters.
* All other aspects of the Force (the energy function, nonbonded method, cutoff distance, etc.) are unaffected and can only
...
...
openmmapi/include/openmm/CustomTorsionForce.h
View file @
71d33617
...
...
@@ -197,7 +197,7 @@ public:
/**
* Update the per-torsion 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.
* Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-torsion parameters.
...
...
openmmapi/include/openmm/GBSAOBCForce.h
View file @
71d33617
...
...
@@ -176,7 +176,7 @@ public:
* Update the 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. Simply call setParticleParameters() to modify this object's parameters, then call
* updateParametersIn
State
() to copy them over to the Context.
* updateParametersIn
Context
() to copy them over to the Context.
*
* The only information this method updates is the values of per-particle parameters. All other aspects
* of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed
...
...
openmmapi/include/openmm/HarmonicAngleForce.h
View file @
71d33617
...
...
@@ -95,7 +95,7 @@ public:
/**
* Update the per-angle 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.
* Simply call setAngleParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setAngleParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-angle parameters. The set of particles involved
...
...
openmmapi/include/openmm/HarmonicBondForce.h
View file @
71d33617
...
...
@@ -92,7 +92,7 @@ public:
/**
* Update the per-bond 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.
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-bond parameters. The set of particles involved
...
...
openmmapi/include/openmm/NonbondedForce.h
View file @
71d33617
...
...
@@ -343,7 +343,7 @@ public:
* Update the particle and exception 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.
* Simply call setParticleParameters() and setExceptionParameters() to modify this object's parameters, then call
* updateParametersIn
State
() to copy them over to the Context.
* updateParametersIn
Context
() to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the parameters of particles and exceptions.
* All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be
...
...
openmmapi/include/openmm/PeriodicTorsionForce.h
View file @
71d33617
...
...
@@ -101,7 +101,7 @@ public:
/**
* Update the per-torsion 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.
* Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-torsion parameters. The set of particles involved
...
...
openmmapi/include/openmm/RBTorsionForce.h
View file @
71d33617
...
...
@@ -110,7 +110,7 @@ public:
/**
* Update the per-torsion 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.
* Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersIn
State
()
* Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersIn
Context
()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-torsion parameters. The set of particles involved
...
...
openmmapi/include/openmm/internal/CMAPTorsionForceImpl.h
View file @
71d33617
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-201
0
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
5
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -60,6 +60,7 @@ public:
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
/**
* Given the energy values for a map, compute the spline coefficients at each point of the map.
*/
...
...
openmmapi/include/openmm/internal/vectorize8.h
View file @
71d33617
...
...
@@ -191,6 +191,18 @@ static inline fvec8 sqrt(const fvec8& v) {
return
fvec8
(
_mm256_sqrt_ps
(
v
.
val
));
}
static
inline
fvec8
rsqrt
(
const
fvec8
&
v
)
{
// Initial estimate of rsqrt().
fvec8
y
(
_mm256_rsqrt_ps
(
v
.
val
));
// Perform an iteration of Newton refinement.
fvec8
x2
=
v
*
0.5
f
;
y
*=
fvec8
(
1.5
f
)
-
x2
*
y
*
y
;
return
y
;
}
static
inline
float
dot8
(
const
fvec8
&
v1
,
const
fvec8
&
v2
)
{
fvec8
result
=
_mm256_dp_ps
(
v1
,
v2
,
0xF1
);
return
_mm_cvtss_f32
(
result
.
lowerVec
())
+
_mm_cvtss_f32
(
result
.
upperVec
());
...
...
openmmapi/include/openmm/internal/vectorize_neon.h
View file @
71d33617
...
...
@@ -251,11 +251,15 @@ static inline fvec4 abs(const fvec4& v) {
return
vabsq_f32
(
v
);
}
static
inline
fvec4
sqrt
(
const
fvec4
&
v
)
{
static
inline
fvec4
r
sqrt
(
const
fvec4
&
v
)
{
float32x4_t
recipSqrt
=
vrsqrteq_f32
(
v
);
recipSqrt
=
vmulq_f32
(
recipSqrt
,
vrsqrtsq_f32
(
vmulq_f32
(
recipSqrt
,
v
),
recipSqrt
));
recipSqrt
=
vmulq_f32
(
recipSqrt
,
vrsqrtsq_f32
(
vmulq_f32
(
recipSqrt
,
v
),
recipSqrt
));
return
vmulq_f32
(
v
,
recipSqrt
);
return
recipSqrt
;
}
static
inline
fvec4
sqrt
(
const
fvec4
&
v
)
{
return
rsqrt
(
v
)
*
v
;
}
static
inline
float
dot3
(
const
fvec4
&
v1
,
const
fvec4
&
v2
)
{
...
...
openmmapi/include/openmm/internal/vectorize_pnacl.h
View file @
71d33617
...
...
@@ -330,7 +330,7 @@ static inline fvec4 ceil(const fvec4& v) {
return
truncated
+
blend
(
0.0
f
,
1.0
f
,
truncated
<
v
);
}
static
inline
fvec4
sqrt
(
const
fvec4
&
v
)
{
static
inline
fvec4
r
sqrt
(
const
fvec4
&
v
)
{
// Initial estimate of rsqrt().
ivec4
i
=
(
__m128i
)
v
;
...
...
@@ -343,7 +343,11 @@ static inline fvec4 sqrt(const fvec4& v) {
y
*=
1.5
f
-
x2
*
y
*
y
;
y
*=
1.5
f
-
x2
*
y
*
y
;
y
*=
1.5
f
-
x2
*
y
*
y
;
return
y
*
v
;
return
y
;
}
static
inline
fvec4
sqrt
(
const
fvec4
&
v
)
{
return
rsqrt
(
v
)
*
v
;
}
#endif
/*OPENMM_VECTORIZE_PNACL_H_*/
...
...
Prev
1
2
3
4
5
…
7
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