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
2b1b486c
Commit
2b1b486c
authored
Jun 17, 2011
by
Peter Eastman
Browse files
Added the enforcePeriodicBox flag to the C and Fortran wrappers
parent
9f700f0d
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
471 additions
and
667 deletions
+471
-667
examples/CMakeLists.txt
examples/CMakeLists.txt
+2
-2
examples/HelloArgonInC.c
examples/HelloArgonInC.c
+1
-1
examples/HelloArgonInFortran.f90
examples/HelloArgonInFortran.f90
+113
-113
examples/HelloSodiumChlorideInC.c
examples/HelloSodiumChlorideInC.c
+1
-1
examples/HelloSodiumChlorideInFortran.f90
examples/HelloSodiumChlorideInFortran.f90
+346
-346
examples/HelloWaterBox.cpp
examples/HelloWaterBox.cpp
+1
-1
plugins/amoeba/wrappers/FortranWrapper_Source.xslt
plugins/amoeba/wrappers/FortranWrapper_Source.xslt
+0
-196
wrappers/CWrapper_Header.xslt
wrappers/CWrapper_Header.xslt
+1
-1
wrappers/CWrapper_Source.xslt
wrappers/CWrapper_Source.xslt
+2
-2
wrappers/FortranWrapper_Source.xslt
wrappers/FortranWrapper_Source.xslt
+4
-4
No files found.
examples/CMakeLists.txt
View file @
2b1b486c
...
@@ -53,7 +53,7 @@ FOREACH(EX_ROOT ${CPP_EXAMPLES})
...
@@ -53,7 +53,7 @@ FOREACH(EX_ROOT ${CPP_EXAMPLES})
ENDFOREACH
(
EX_ROOT
${
CPP_EXAMPLES
}
)
ENDFOREACH
(
EX_ROOT
${
CPP_EXAMPLES
}
)
# Only build wrapper examples if wrappers have been built
# Only build wrapper examples if wrappers have been built
IF
(
OPENMM_BUILD_
API
_WRAPPERS
)
IF
(
OPENMM_BUILD_
C_AND_FORTRAN
_WRAPPERS
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_BINARY_DIR
}
/wrappers
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_BINARY_DIR
}
/wrappers
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
...
@@ -83,7 +83,7 @@ IF(OPENMM_BUILD_API_WRAPPERS)
...
@@ -83,7 +83,7 @@ IF(OPENMM_BUILD_API_WRAPPERS)
ADD_DEPENDENCIES
(
${
EX_STATIC
}
ApiWrappers
)
ADD_DEPENDENCIES
(
${
EX_STATIC
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_STATIC
)
ENDIF
(
BUILD_TESTING_STATIC
)
ENDFOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
ENDFOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
ENDIF
(
OPENMM_BUILD_
API
_WRAPPERS
)
ENDIF
(
OPENMM_BUILD_
C_AND_FORTRAN
_WRAPPERS
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
INSTALL
(
FILES
${
EX_ROOT
}
.c DESTINATION examples
)
INSTALL
(
FILES
${
EX_ROOT
}
.c DESTINATION examples
)
...
...
examples/HelloArgonInC.c
View file @
2b1b486c
...
@@ -68,7 +68,7 @@ void simulateArgon()
...
@@ -68,7 +68,7 @@ void simulateArgon()
/* Simulate. */
/* Simulate. */
for
(
frameNum
=
1
;
;
++
frameNum
)
{
for
(
frameNum
=
1
;
;
++
frameNum
)
{
/* Output current state information. */
/* Output current state information. */
OpenMM_State
*
state
=
OpenMM_Context_getState
(
context
,
OpenMM_State_Positions
);
OpenMM_State
*
state
=
OpenMM_Context_getState
(
context
,
OpenMM_State_Positions
,
0
);
const
double
timeInPs
=
OpenMM_State_getTime
(
state
);
const
double
timeInPs
=
OpenMM_State_getTime
(
state
);
writePdbFrame
(
frameNum
,
state
);
/*output coordinates*/
writePdbFrame
(
frameNum
,
state
);
/*output coordinates*/
OpenMM_State_destroy
(
state
);
OpenMM_State_destroy
(
state
);
...
...
examples/HelloArgonInFortran.f90
View file @
2b1b486c
...
@@ -67,7 +67,7 @@ PROGRAM HelloArgon
...
@@ -67,7 +67,7 @@ PROGRAM HelloArgon
frameNum
=
1
frameNum
=
1
do
do
! Output current state information.
! Output current state information.
call
OpenMM_Context_getState
(
context
,
OpenMM_State_Positions
,
state
)
call
OpenMM_Context_getState
(
context
,
OpenMM_State_Positions
,
state
,
0
)
timeInPs
=
OpenMM_State_getTime
(
state
)
timeInPs
=
OpenMM_State_getTime
(
state
)
call
writePdbFrame
(
frameNum
,
state
)
!output coordinates
call
writePdbFrame
(
frameNum
,
state
)
!output coordinates
call
OpenMM_State_destroy
(
state
)
call
OpenMM_State_destroy
(
state
)
...
...
examples/HelloSodiumChlorideInC.c
View file @
2b1b486c
...
@@ -289,7 +289,7 @@ myGetOpenMMState(MyOpenMMData* omm, int wantEnergy,
...
@@ -289,7 +289,7 @@ myGetOpenMMState(MyOpenMMData* omm, int wantEnergy,
/* Forces are also available (and cheap). */
/* Forces are also available (and cheap). */
/* State object is created here and must be explicitly destroyed below. */
/* State object is created here and must be explicitly destroyed below. */
state
=
OpenMM_Context_getState
(
omm
->
context
,
infoMask
);
state
=
OpenMM_Context_getState
(
omm
->
context
,
infoMask
,
0
);
*
timeInPs
=
OpenMM_State_getTime
(
state
);
/* OpenMM time is in ps already. */
*
timeInPs
=
OpenMM_State_getTime
(
state
);
/* OpenMM time is in ps already. */
/* Positions are maintained as a Vec3Array inside the State. This will give
/* Positions are maintained as a Vec3Array inside the State. This will give
...
...
examples/HelloSodiumChlorideInFortran.f90
View file @
2b1b486c
...
@@ -282,7 +282,7 @@ SUBROUTINE myGetOpenMMState(ommHandle, timeInPs, energyInKcal)
...
@@ -282,7 +282,7 @@ SUBROUTINE myGetOpenMMState(ommHandle, timeInPs, energyInKcal)
! Forces are also available (and cheap).
! Forces are also available (and cheap).
! Don't forget to destroy this State when you're done with it.
! Don't forget to destroy this State when you're done with it.
call
OpenMM_Context_getState
(
context
,
infoMask
,
state
)
call
OpenMM_Context_getState
(
context
,
infoMask
,
state
,
0
)
timeInPs
=
OpenMM_State_getTime
(
state
)
! OpenMM time is in ps already.
timeInPs
=
OpenMM_State_getTime
(
state
)
! OpenMM time is in ps already.
! Positions are maintained as a Vec3Array inside the State. This will give
! Positions are maintained as a Vec3Array inside the State. This will give
...
...
examples/HelloWaterBox.cpp
View file @
2b1b486c
...
@@ -356,7 +356,7 @@ myGetOpenMMState(MyOpenMMData* omm, double& timeInPs,
...
@@ -356,7 +356,7 @@ myGetOpenMMState(MyOpenMMData* omm, double& timeInPs,
std
::
vector
<
double
>&
atomPositionsInAng
)
std
::
vector
<
double
>&
atomPositionsInAng
)
{
{
// We don't calculate energy in this example because it would take most of the time
// We don't calculate energy in this example because it would take most of the time
const
OpenMM
::
State
state
=
omm
->
context
->
getState
(
OpenMM
::
State
::
Positions
);
const
OpenMM
::
State
state
=
omm
->
context
->
getState
(
OpenMM
::
State
::
Positions
,
true
);
timeInPs
=
state
.
getTime
();
// OpenMM time is in ps already
timeInPs
=
state
.
getTime
();
// OpenMM time is in ps already
// Copy OpenMM positions into output array and change units from nm to Angstroms.
// Copy OpenMM positions into output array and change units from nm to Angstroms.
...
...
plugins/amoeba/wrappers/FortranWrapper_Source.xslt
View file @
2b1b486c
...
@@ -68,202 +68,6 @@ static string makeString(const char* fsrc, int length) {
...
@@ -68,202 +68,6 @@ static string makeString(const char* fsrc, int length) {
extern "C" {
extern "C" {
/* OpenMM_Vec3 */
OPENMM_EXPORT void openmm_vec3_scale_(const OpenMM_Vec3
&
vec, double const
&
scale, OpenMM_Vec3
&
result) {
result = OpenMM_Vec3_scale(vec, scale);
}
OPENMM_EXPORT void OPENMM_VEC3_SCALE(const OpenMM_Vec3
&
vec, double const
&
scale, OpenMM_Vec3
&
result) {
result = OpenMM_Vec3_scale(vec, scale);
}
/* OpenMM_Vec3Array */
OPENMM_EXPORT void openmm_vec3array_create_(OpenMM_Vec3Array*
&
result, const int
&
size) {
result = OpenMM_Vec3Array_create(size);
}
OPENMM_EXPORT void OPENMM_VEC3ARRAY_CREATE(OpenMM_Vec3Array*
&
result, const int
&
size) {
result = OpenMM_Vec3Array_create(size);
}
OPENMM_EXPORT void openmm_vec3array_destroy_(OpenMM_Vec3Array*
&
array) {
OpenMM_Vec3Array_destroy(array);
array = 0;
}
OPENMM_EXPORT void OPENMM_VEC3ARRAY_DESTROY(OpenMM_Vec3Array*
&
array) {
OpenMM_Vec3Array_destroy(array);
array = 0;
}
OPENMM_EXPORT int openmm_vec3array_getsize_(const OpenMM_Vec3Array* const
&
array) {
return OpenMM_Vec3Array_getSize(array);
}
OPENMM_EXPORT int OPENMM_VEC3ARRAY_GETSIZE(const OpenMM_Vec3Array* const
&
array) {
return OpenMM_Vec3Array_getSize(array);
}
OPENMM_EXPORT void openmm_vec3array_resize_(OpenMM_Vec3Array* const
&
array, const int
&
size) {
OpenMM_Vec3Array_resize(array, size);
}
OPENMM_EXPORT void OPENMM_VEC3ARRAY_RESIZE(OpenMM_Vec3Array* const
&
array, const int
&
size) {
OpenMM_Vec3Array_resize(array, size);
}
OPENMM_EXPORT void openmm_vec3array_append_(OpenMM_Vec3Array* const
&
array, const OpenMM_Vec3
&
vec) {
OpenMM_Vec3Array_append(array, vec);
}
OPENMM_EXPORT void OPENMM_VEC3ARRAY_APPEND(OpenMM_Vec3Array* const
&
array, const OpenMM_Vec3
&
vec) {
OpenMM_Vec3Array_append(array, vec);
}
OPENMM_EXPORT void openmm_vec3array_set_(OpenMM_Vec3Array* const
&
array, const int
&
index, const OpenMM_Vec3
&
vec) {
OpenMM_Vec3Array_set(array, index-1, vec);
}
OPENMM_EXPORT void OPENMM_VEC3ARRAY_SET(OpenMM_Vec3Array* const
&
array, const int
&
index, const OpenMM_Vec3
&
vec) {
OpenMM_Vec3Array_set(array, index-1, vec);
}
OPENMM_EXPORT void openmm_vec3array_get_(const OpenMM_Vec3Array* const
&
array, const int
&
index, OpenMM_Vec3
&
result) {
result = *OpenMM_Vec3Array_get(array, index-1);
}
OPENMM_EXPORT void OPENMM_VEC3ARRAY_GET(const OpenMM_Vec3Array* const
&
array, const int
&
index, OpenMM_Vec3
&
result) {
result = *OpenMM_Vec3Array_get(array, index-1);
}
/* OpenMM_StringArray */
OPENMM_EXPORT void openmm_stringarray_create_(OpenMM_StringArray*
&
result, const int
&
size) {
result = OpenMM_StringArray_create(size);
}
OPENMM_EXPORT void OPENMM_STRINGARRAY_CREATE(OpenMM_StringArray*
&
result, const int
&
size) {
result = OpenMM_StringArray_create(size);
}
OPENMM_EXPORT void openmm_stringarray_destroy_(OpenMM_StringArray*
&
array) {
OpenMM_StringArray_destroy(array);
array = 0;
}
OPENMM_EXPORT void OPENMM_STRINGARRAY_DESTROY(OpenMM_StringArray*
&
array) {
OpenMM_StringArray_destroy(array);
array = 0;
}
OPENMM_EXPORT int openmm_stringarray_getsize_(const OpenMM_StringArray* const
&
array) {
return OpenMM_StringArray_getSize(array);
}
OPENMM_EXPORT int OPENMM_STRINGARRAY_GETSIZE(const OpenMM_StringArray* const
&
array) {
return OpenMM_StringArray_getSize(array);
}
OPENMM_EXPORT void openmm_stringarray_resize_(OpenMM_StringArray* const
&
array, const int
&
size) {
OpenMM_StringArray_resize(array, size);
}
OPENMM_EXPORT void OPENMM_STRINGARRAY_RESIZE(OpenMM_StringArray* const
&
array, const int
&
size) {
OpenMM_StringArray_resize(array, size);
}
OPENMM_EXPORT void openmm_stringarray_append_(OpenMM_StringArray* const
&
array, const char* str, int length) {
OpenMM_StringArray_append(array, makeString(str, length).c_str());
}
OPENMM_EXPORT void OPENMM_STRINGARRAY_APPEND(OpenMM_StringArray* const
&
array, const char* str, int length) {
OpenMM_StringArray_append(array, makeString(str, length).c_str());
}
OPENMM_EXPORT void openmm_stringarray_set_(OpenMM_StringArray* const
&
array, const int
&
index, const char* str, int length) {
OpenMM_StringArray_set(array, index-1, makeString(str, length).c_str());
}
OPENMM_EXPORT void OPENMM_STRINGARRAY_SET(OpenMM_StringArray* const
&
array, const int
&
index, const char* str, int length) {
OpenMM_StringArray_set(array, index-1, makeString(str, length).c_str());
}
OPENMM_EXPORT void openmm_stringarray_get_(const OpenMM_StringArray* const
&
array, const int
&
index, char* result, int length) {
const char* str = OpenMM_StringArray_get(array, index-1);
copyAndPadString(result, str, length);
}
OPENMM_EXPORT void OPENMM_STRINGARRAY_GET(const OpenMM_StringArray* const
&
array, const int
&
index, char* result, int length) {
const char* str = OpenMM_StringArray_get(array, index-1);
copyAndPadString(result, str, length);
}
/* OpenMM_BondArray */
OPENMM_EXPORT void openmm_bondarray_create_(OpenMM_BondArray*
&
result, const int
&
size) {
result = OpenMM_BondArray_create(size);
}
OPENMM_EXPORT void OPENMM_BONDARRAY_CREATE(OpenMM_BondArray*
&
result, const int
&
size) {
result = OpenMM_BondArray_create(size);
}
OPENMM_EXPORT void openmm_bondarray_destroy_(OpenMM_BondArray*
&
array) {
OpenMM_BondArray_destroy(array);
array = 0;
}
OPENMM_EXPORT void OPENMM_BONDARRAY_DESTROY(OpenMM_BondArray*
&
array) {
OpenMM_BondArray_destroy(array);
array = 0;
}
OPENMM_EXPORT int openmm_bondarray_getsize_(const OpenMM_BondArray* const
&
array) {
return OpenMM_BondArray_getSize(array);
}
OPENMM_EXPORT int OPENMM_BONDARRAY_GETSIZE(const OpenMM_BondArray* const
&
array) {
return OpenMM_BondArray_getSize(array);
}
OPENMM_EXPORT void openmm_bondarray_resize_(OpenMM_BondArray* const
&
array, const int
&
size) {
OpenMM_BondArray_resize(array, size);
}
OPENMM_EXPORT void OPENMM_BONDARRAY_RESIZE(OpenMM_BondArray* const
&
array, const int
&
size) {
OpenMM_BondArray_resize(array, size);
}
OPENMM_EXPORT void openmm_bondarray_append_(OpenMM_BondArray* const
&
array, const int
&
particle1, const int
&
particle2) {
OpenMM_BondArray_append(array, particle1, particle2);
}
OPENMM_EXPORT void OPENMM_BONDARRAY_APPEND(OpenMM_BondArray* const
&
array, const int
&
particle1, const int
&
particle2) {
OpenMM_BondArray_append(array, particle1, particle2);
}
OPENMM_EXPORT void openmm_bondarray_set_(OpenMM_BondArray* const
&
array, const int
&
index, const int
&
particle1, const int
&
particle2) {
OpenMM_BondArray_set(array, index-1, particle1, particle2);
}
OPENMM_EXPORT void OPENMM_BONDARRAY_SET(OpenMM_BondArray* const
&
array, const int
&
index, const int
&
particle1, const int
&
particle2) {
OpenMM_BondArray_set(array, index-1, particle1, particle2);
}
OPENMM_EXPORT void openmm_bondarray_get_(const OpenMM_BondArray* const
&
array, const int
&
index, int* particle1, int* particle2) {
OpenMM_BondArray_get(array, index-1, particle1, particle2);
}
OPENMM_EXPORT void OPENMM_BONDARRAY_GET(const OpenMM_BondArray* const
&
array, const int
&
index, int* particle1, int* particle2) {
OpenMM_BondArray_get(array, index-1, particle1, particle2);
}
/* OpenMM_ParameterArray */
OPENMM_EXPORT int openmm_parameterarray_getsize_(const OpenMM_ParameterArray* const
&
array) {
return OpenMM_ParameterArray_getSize(array);
}
OPENMM_EXPORT int OPENMM_PARAMETERARRAY_GETSIZE(const OpenMM_ParameterArray* const
&
array) {
return OpenMM_ParameterArray_getSize(array);
}
OPENMM_EXPORT double openmm_parameterarray_get_(const OpenMM_ParameterArray* const
&
array, const char* name, int length) {
return OpenMM_ParameterArray_get(array, makeString(name, length).c_str());
}
OPENMM_EXPORT double OPENMM_PARAMETERARRAY_GET(const OpenMM_ParameterArray* const
&
array, const char* name, int length) {
return OpenMM_ParameterArray_get(array, makeString(name, length).c_str());
}
/* OpenMM_PropertyArray */
OPENMM_EXPORT int openmm_propertyarray_getsize_(const OpenMM_PropertyArray* const
&
array) {
return OpenMM_PropertyArray_getSize(array);
}
OPENMM_EXPORT int OPENMM_PROPERTYARRAY_GETSIZE(const OpenMM_PropertyArray* const
&
array) {
return OpenMM_PropertyArray_getSize(array);
}
OPENMM_EXPORT const char* openmm_propertyarray_get_(const OpenMM_PropertyArray* const
&
array, const char* name, int length) {
return OpenMM_PropertyArray_get(array, makeString(name, length).c_str());
}
OPENMM_EXPORT const char* OPENMM_PROPERTYARRAY_GET(const OpenMM_PropertyArray* const
&
array, const char* name, int length) {
return OpenMM_PropertyArray_get(array, makeString(name, length).c_str());
}
<xsl:call-template
name=
"primitive_array"
>
<xsl:with-param
name=
"element_type"
select=
"'int'"
/>
<xsl:with-param
name=
"name"
select=
"'OpenMM_IntArray'"
/>
</xsl:call-template>
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
OPENMM_EXPORT void openmm_context_getstate_(const OpenMM_Context*
&
target, int const
&
types, OpenMM_State*
&
result) {
result = OpenMM_Context_getState(target, types);
};
OPENMM_EXPORT void OPENMM_CONTEXT_GETSTATE(const OpenMM_Context*
&
target, int const
&
types, OpenMM_State*
&
result) {
result = OpenMM_Context_getState(target, types);
};
OPENMM_EXPORT void openmm_platform_loadpluginsfromdirectory_(const char* directory, OpenMM_StringArray*
&
result, int length) {
result = OpenMM_Platform_loadPluginsFromDirectory(makeString(directory, length).c_str());
};
OPENMM_EXPORT void OPENMM_PLATFORM_LOADPLUGINSFROMDIRECTORY(const char* directory, OpenMM_StringArray*
&
result, int length) {
result = OpenMM_Platform_loadPluginsFromDirectory(makeString(directory, length).c_str());
};
<!-- Class members -->
<!-- Class members -->
<xsl:for-each
select=
"Class[@context=$openmm_namespace_id and empty(index-of($skip_classes, @name))]"
>
<xsl:for-each
select=
"Class[@context=$openmm_namespace_id and empty(index-of($skip_classes, @name))]"
>
<xsl:call-template
name=
"class"
/>
<xsl:call-template
name=
"class"
/>
...
...
wrappers/CWrapper_Header.xslt
View file @
2b1b486c
...
@@ -100,7 +100,7 @@ extern OPENMM_EXPORT const char* OpenMM_PropertyArray_get(const OpenMM_PropertyA
...
@@ -100,7 +100,7 @@ extern OPENMM_EXPORT const char* OpenMM_PropertyArray_get(const OpenMM_PropertyA
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
extern OPENMM_EXPORT OpenMM_State* OpenMM_Context_getState(const OpenMM_Context* target, int types);
extern OPENMM_EXPORT OpenMM_State* OpenMM_Context_getState(const OpenMM_Context* target, int types
, int enforcePeriodicBox
);
extern OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_loadPluginsFromDirectory(const char* directory);
extern OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_loadPluginsFromDirectory(const char* directory);
<!-- Class members -->
<!-- Class members -->
...
...
wrappers/CWrapper_Source.xslt
View file @
2b1b486c
...
@@ -150,8 +150,8 @@ OPENMM_EXPORT const char* OpenMM_PropertyArray_get(const OpenMM_PropertyArray* a
...
@@ -150,8 +150,8 @@ OPENMM_EXPORT const char* OpenMM_PropertyArray_get(const OpenMM_PropertyArray* a
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
OPENMM_EXPORT OpenMM_State* OpenMM_Context_getState(const OpenMM_Context* target, int types) {
OPENMM_EXPORT OpenMM_State* OpenMM_Context_getState(const OpenMM_Context* target, int types
, int enforcePeriodicBox
) {
State result = reinterpret_cast
<
const Context*
>
(target)->getState(types);
State result = reinterpret_cast
<
const Context*
>
(target)->getState(types
, enforcePeriodicBox
);
return reinterpret_cast
<
OpenMM_State*
>
(new State(result));
return reinterpret_cast
<
OpenMM_State*
>
(new State(result));
};
};
OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_loadPluginsFromDirectory(const char* directory) {
OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_loadPluginsFromDirectory(const char* directory) {
...
...
wrappers/FortranWrapper_Source.xslt
View file @
2b1b486c
...
@@ -245,11 +245,11 @@ OPENMM_EXPORT const char* OPENMM_PROPERTYARRAY_GET(const OpenMM_PropertyArray* c
...
@@ -245,11 +245,11 @@ OPENMM_EXPORT const char* OPENMM_PROPERTYARRAY_GET(const OpenMM_PropertyArray* c
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
/* These methods need to be handled specially, since their C++ APIs cannot be directly translated to C.
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
Unlike the C++ versions, the return value is allocated on the heap, and you must delete it yourself. */
OPENMM_EXPORT void openmm_context_getstate_(const OpenMM_Context*
&
target, int const
&
types, OpenMM_State*
&
result) {
OPENMM_EXPORT void openmm_context_getstate_(const OpenMM_Context*
&
target, int const
&
types,
int const
&
enforcePeriodicBox,
OpenMM_State*
&
result) {
result = OpenMM_Context_getState(target, types);
result = OpenMM_Context_getState(target, types
, enforcePeriodicBox
);
};
};
OPENMM_EXPORT void OPENMM_CONTEXT_GETSTATE(const OpenMM_Context*
&
target, int const
&
types, OpenMM_State*
&
result) {
OPENMM_EXPORT void OPENMM_CONTEXT_GETSTATE(const OpenMM_Context*
&
target, int const
&
types,
int const
&
enforcePeriodicBox,
OpenMM_State*
&
result) {
result = OpenMM_Context_getState(target, types);
result = OpenMM_Context_getState(target, types
, enforcePeriodicBox
);
};
};
OPENMM_EXPORT void openmm_platform_loadpluginsfromdirectory_(const char* directory, OpenMM_StringArray*
&
result, int length) {
OPENMM_EXPORT void openmm_platform_loadpluginsfromdirectory_(const char* directory, OpenMM_StringArray*
&
result, int length) {
result = OpenMM_Platform_loadPluginsFromDirectory(makeString(directory, length).c_str());
result = OpenMM_Platform_loadPluginsFromDirectory(makeString(directory, length).c_str());
...
...
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