1
-
2
1
%module openmmcppforces
3
2
4
- %import (module =" openmm" ) " swig/OpenMMSwigHeaders.i"
5
- %include " swig/typemaps.i"
6
- %include <std_string.i>
7
- %include <std_vector.i>
8
- %include <std_map.i>
9
-
10
- namespace std {
11
- %template (vectord) vector<double >;
12
- %template (vectorstring) vector<string>;
13
- %template (mapstringstring) map<string,string>;
14
- %template (mapstringdouble) map<string,double >;
15
- };
16
-
17
3
%{
18
4
#define SWIG_PYTHON_CAST_MODE
19
5
#include " ConcertedRMSDForce.h"
@@ -22,8 +8,22 @@ namespace std {
22
8
#include " OpenMMDrude.h"
23
9
#include " openmm/RPMDIntegrator.h"
24
10
#include " openmm/RPMDMonteCarloBarostat.h"
11
+ #include " openmm/Force.h"
12
+ #include " openmm/Vec3.h"
13
+ #include < numpy/ndarrayobject.h>
14
+
15
+ using namespace OpenMM ;
25
16
%}
26
17
18
+ %import (module =" openmm" ) " swig/OpenMMSwigHeaders.i"
19
+ %include " swig/typemaps.i"
20
+ %include " header.i"
21
+ %include " std_vector.i"
22
+
23
+ namespace std {
24
+ %template (vectori) vector<int >;
25
+ };
26
+
27
27
%pythoncode %{
28
28
__version__ = " @CMAKE_PROJECT_VERSION@"
29
29
%}
@@ -64,11 +64,11 @@ namespace OpenMMCPPForces {
64
64
*/
65
65
class ConcertedRMSDForce : public OpenMM ::Force {
66
66
public:
67
- explicit ConcertedRMSDForce (const std::vector<OpenMM:: Vec3>& referencePositions);
67
+ explicit ConcertedRMSDForce (const std::vector<Vec3>& referencePositions);
68
68
/* *
69
69
* Get the reference positions to compute the deviation from.
70
70
*/
71
- const std::vector<OpenMM:: Vec3>& getReferencePositions () const ;
71
+ const std::vector<Vec3>& getReferencePositions () const ;
72
72
/* *
73
73
* Set the reference positions to compute the deviation from.
74
74
*
@@ -79,7 +79,7 @@ public:
79
79
* vector must equal the number of particles in the system, even if not all
80
80
* particles are used in computing the concerted RMSD.
81
81
*/
82
- void setReferencePositions (const std::vector<OpenMM:: Vec3>& positions);
82
+ void setReferencePositions (const std::vector<Vec3>& positions);
83
83
/* *
84
84
* Add a group of particles to be included in the concerted RMSD calculation.
85
85
*
@@ -125,12 +125,12 @@ public:
125
125
void setGroup (int index, const std::vector<int >& particles);
126
126
/* *
127
127
* Update the reference positions and particle groups in a Context to match those stored
128
- * in this Force object. This method provides an efficient way to update these parameters
128
+ * in this OpenMM:: Force object. This method provides an efficient way to update these parameters
129
129
* in an existing Context without needing to reinitialize it. Simply call setReferencePositions()
130
130
* and setGroup() to modify this object's parameters, then call updateParametersInContext()
131
131
* to copy them over to the Context.
132
132
*/
133
- void updateParametersInContext (OpenMM:: Context& context);
133
+ void updateParametersInContext (Context& context);
134
134
/* *
135
135
* Returns whether or not this force makes use of periodic boundary
136
136
* conditions.
@@ -139,7 +139,7 @@ public:
139
139
*/
140
140
bool usesPeriodicBoundaryConditions ();
141
141
/*
142
- * Add methods for casting a Force to an ExtendedCustomCVForce.
142
+ * Add methods for casting a OpenMM:: Force to an ExtendedCustomCVForce.
143
143
*/
144
144
%extend {
145
145
static OpenMMCPPForces::ConcertedRMSDForce& cast (OpenMM::Force& force) {
0 commit comments