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
1a37f02a
Commit
1a37f02a
authored
Jun 29, 2015
by
Robert McGibbon
Browse files
Change function name
parent
6cd01b2c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
25 deletions
+18
-25
olla/include/openmm/Platform.h
olla/include/openmm/Platform.h
+3
-3
olla/src/Platform.cpp
olla/src/Platform.cpp
+5
-12
wrappers/generateWrappers.py
wrappers/generateWrappers.py
+9
-9
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+1
-1
No files found.
olla/include/openmm/Platform.h
View file @
1a37f02a
...
...
@@ -174,7 +174,7 @@ public:
/**
* Get any failures caused during the last call to loadPluginsFromDirectory
*/
static
std
::
vector
<
std
::
string
>
getLoadFailures
();
static
std
::
vector
<
std
::
string
>
get
Plugin
LoadFailures
();
/**
* Get the registered Platform with a particular name. If no Platform with that name has been
* registered, this throws an exception.
...
...
@@ -205,7 +205,7 @@ public:
* Load multiple dynamic libraries (DLLs) which contain OpenMM plugins from a single directory.
* This method loops over every file contained in the specified directory and calls loadPluginLibrary()
* for each one. If an error occurs while trying to load a particular file, that file is simply
* ignored.
* ignored.
You can retrieve a list of all such errors by calling getPluginLoadFailures().
*
* @param directory the path to the directory containing libraries to load
* @return the names of all files which were successfully loaded as libraries
...
...
@@ -237,7 +237,7 @@ private:
std
::
map
<
std
::
string
,
KernelFactory
*>
kernelFactories
;
std
::
map
<
std
::
string
,
std
::
string
>
defaultProperties
;
static
std
::
vector
<
Platform
*>&
getPlatforms
();
static
std
::
vector
<
std
::
string
>
l
oadFailures
;
static
std
::
vector
<
std
::
string
>
pluginL
oadFailures
;
};
...
...
olla/src/Platform.cpp
View file @
1a37f02a
...
...
@@ -45,19 +45,13 @@
#include <cstdlib>
#endif
#include <set>
#include <algorithm>
#include "ReferencePlatform.h"
using
namespace
OpenMM
;
using
namespace
std
;
std
::
vector
<
std
::
string
>
Platform
::
loadFailures
;
static
bool
stringLengthComparator
(
string
i
,
string
j
)
{
return
(
i
.
size
()
<
j
.
size
());
}
std
::
vector
<
std
::
string
>
Platform
::
pluginLoadFailures
;
static
int
registerPlatforms
()
{
...
...
@@ -148,8 +142,8 @@ Platform& Platform::getPlatform(int index) {
throw
OpenMMException
(
"Invalid platform index"
);
}
std
::
vector
<
std
::
string
>
Platform
::
getLoadFailures
()
{
return
l
oadFailures
;
std
::
vector
<
std
::
string
>
Platform
::
get
Plugin
LoadFailures
()
{
return
pluginL
oadFailures
;
}
Platform
&
Platform
::
getPlatformByName
(
const
string
&
name
)
{
...
...
@@ -274,15 +268,14 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
vector
<
void
*>
plugins
;
#endif
vector
<
string
>
loadedLibraries
;
std
::
sort
(
files
.
begin
(),
files
.
end
(),
stringLengthComparator
);
loadFailures
.
resize
(
0
);
pluginLoadFailures
.
resize
(
0
);
for
(
unsigned
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
try
{
plugins
.
push_back
(
loadOneLibrary
(
directory
+
dirSeparator
+
files
[
i
]));
loadedLibraries
.
push_back
(
files
[
i
]);
}
catch
(
OpenMMException
&
ex
)
{
l
oadFailures
.
push_back
(
ex
.
what
());
pluginL
oadFailures
.
push_back
(
ex
.
what
());
}
}
initializePlugins
(
plugins
);
...
...
wrappers/generateWrappers.py
View file @
1a37f02a
...
...
@@ -68,7 +68,7 @@ class WrapperGenerator:
def
__init__
(
self
,
inputDirname
,
output
):
self
.
skipClasses
=
[
'OpenMM::Vec3'
,
'OpenMM::XmlSerializer'
,
'OpenMM::Kernel'
,
'OpenMM::KernelImpl'
,
'OpenMM::KernelFactory'
,
'OpenMM::ContextImpl'
,
'OpenMM::SerializationNode'
,
'OpenMM::SerializationProxy'
]
self
.
skipMethods
=
[
'OpenMM::Context::getState'
,
'OpenMM::Platform::loadPluginsFromDirectory'
,
'OpenMM::Platform::getLoadFailures'
,
'OpenMM::Context::createCheckpoint'
,
'OpenMM::Context::loadCheckpoint'
,
'OpenMM::Context::getMolecules'
]
self
.
skipMethods
=
[
'OpenMM::Context::getState'
,
'OpenMM::Platform::loadPluginsFromDirectory'
,
'OpenMM::Platform::get
Plugin
LoadFailures'
,
'OpenMM::Context::createCheckpoint'
,
'OpenMM::Context::loadCheckpoint'
,
'OpenMM::Context::getMolecules'
]
self
.
hideClasses
=
[
'Kernel'
,
'KernelImpl'
,
'KernelFactory'
,
'ContextImpl'
,
'SerializationNode'
,
'SerializationProxy'
]
self
.
nodeByID
=
{}
...
...
@@ -398,7 +398,7 @@ extern OPENMM_EXPORT void %(name)s_insert(%(name)s* set, %(type)s value);""" % v
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, int enforcePeriodicBox);
extern OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_loadPluginsFromDirectory(const char* directory);
extern OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_getLoadFailures();
extern OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_get
Plugin
LoadFailures();
extern OPENMM_EXPORT char* OpenMM_XmlSerializer_serializeSystem(const OpenMM_System* system);
extern OPENMM_EXPORT char* OpenMM_XmlSerializer_serializeState(const OpenMM_State* state);
extern OPENMM_EXPORT char* OpenMM_XmlSerializer_serializeIntegrator(const OpenMM_Integrator* integrator);
...
...
@@ -805,8 +805,8 @@ OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_loadPluginsFromDirectory(const
vector<string> result = Platform::loadPluginsFromDirectory(string(directory));
return reinterpret_cast<OpenMM_StringArray*>(new vector<string>(result));
}
OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_getLoadFailures() {
vector<string> result = Platform::getLoadFailures();
OPENMM_EXPORT OpenMM_StringArray* OpenMM_Platform_get
Plugin
LoadFailures() {
vector<string> result = Platform::get
Plugin
LoadFailures();
return reinterpret_cast<OpenMM_StringArray*>(new vector<string>(result));
}
static char* createStringFromStream(stringstream& stream) {
...
...
@@ -1319,7 +1319,7 @@ MODULE OpenMM
character(*) directory
type(OpenMM_StringArray) result
end subroutine
subroutine OpenMM_Platform_getLoadFailures(result)
subroutine OpenMM_Platform_get
Plugin
LoadFailures(result)
use OpenMM_Types; implicit none
type(OpenMM_StringArray) result
end subroutine
...
...
@@ -1997,11 +1997,11 @@ OPENMM_EXPORT void openmm_platform_loadpluginsfromdirectory_(const char* directo
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_getloadfailures_(OpenMM_StringArray*& result) {
result = OpenMM_Platform_getLoadFailures();
OPENMM_EXPORT void openmm_platform_get
plugin
loadfailures_(OpenMM_StringArray*& result) {
result = OpenMM_Platform_get
Plugin
LoadFailures();
}
OPENMM_EXPORT void OPENMM_PLATFORM_GETLOADFAILURES(OpenMM_StringArray*& result) {
result = OpenMM_Platform_getLoadFailures();
OPENMM_EXPORT void OPENMM_PLATFORM_GET
PLUGIN
LOADFAILURES(OpenMM_StringArray*& result) {
result = OpenMM_Platform_get
Plugin
LoadFailures();
}
OPENMM_EXPORT void openmm_xmlserializer_serializesystemtoc_(OpenMM_System*& system, char*& result, int& result_length) {
convertStringToChars(OpenMM_XmlSerializer_serializeSystem(system), result, result_length);
...
...
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
1a37f02a
...
...
@@ -180,7 +180,7 @@ UNITS = {
(
"*"
,
"getParticleMass"
)
:
(
"unit.amu"
,
()),
(
"*"
,
"getPlatform"
)
:
(
None
,
()),
(
"*"
,
"getPlatformByName"
)
:
(
None
,
()),
(
"*"
,
"getLoadFailures"
):
(
None
,
()),
(
"*"
,
"get
Plugin
LoadFailures"
):
(
None
,
()),
(
"*"
,
"getRandomNumberSeed"
)
:
(
None
,
()),
(
"*"
,
"getReactionFieldDielectric"
)
:
(
None
,
()),
(
"*"
,
"getSoluteDielectric"
)
:
(
None
,
()),
...
...
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