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
bf2a390b
Commit
bf2a390b
authored
Jul 09, 2009
by
Peter Eastman
Browse files
Minor API changes
parent
de099a02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
olla/include/openmm/Platform.h
olla/include/openmm/Platform.h
+3
-3
olla/src/Platform.cpp
olla/src/Platform.cpp
+7
-5
openmmapi/include/openmm/AndersenThermostat.h
openmmapi/include/openmm/AndersenThermostat.h
+6
-4
No files found.
olla/include/openmm/Platform.h
View file @
bf2a390b
...
...
@@ -120,7 +120,7 @@ public:
* @return true if this Platform provides implementations of all the kernels in the list,
* false if there are any which it does not support
*/
bool
supportsKernels
(
std
::
vector
<
std
::
string
>
kernelNames
)
const
;
bool
supportsKernels
(
const
std
::
vector
<
std
::
string
>
&
kernelNames
)
const
;
/**
* Create a Kernel object. If you call this method multiple times for different contexts with the same name,
* the returned Kernels are independent and do not interact with each other. This means
...
...
@@ -167,7 +167,7 @@ public:
* @return the fastest registered Platform which supports all of the requested kernels. If no
* Platform exists which supports all of them, this will throw an exception.
*/
static
Platform
&
findPlatform
(
std
::
vector
<
std
::
string
>
kernelNames
);
static
Platform
&
findPlatform
(
const
std
::
vector
<
std
::
string
>
&
kernelNames
);
/**
* Load a dynamic library (DLL) which contains an OpenMM plugin. Typically, each Platform
* is distributed as a separate dynamic library. This method can then be called at runtime
...
...
@@ -198,7 +198,7 @@ public:
*
* @return the path to the default plugin directory
*/
static
std
::
string
getDefaultPluginsDirectory
();
static
const
std
::
string
&
getDefaultPluginsDirectory
();
private:
// Retarded visual studio compiler complains about being unable to
...
...
olla/src/Platform.cpp
View file @
bf2a390b
...
...
@@ -88,7 +88,7 @@ void Platform::registerStreamFactory(string name, StreamFactory* factory) {
streamFactories
[
name
]
=
factory
;
}
bool
Platform
::
supportsKernels
(
vector
<
string
>
kernelNames
)
const
{
bool
Platform
::
supportsKernels
(
const
vector
<
string
>
&
kernelNames
)
const
{
for
(
int
i
=
0
;
i
<
(
int
)
kernelNames
.
size
();
++
i
)
if
(
kernelFactories
.
find
(
kernelNames
[
i
])
==
kernelFactories
.
end
())
return
false
;
...
...
@@ -124,7 +124,7 @@ Platform& Platform::getPlatform(int index) {
return
*
getPlatforms
()[
index
];
}
Platform
&
Platform
::
findPlatform
(
vector
<
string
>
kernelNames
)
{
Platform
&
Platform
::
findPlatform
(
const
vector
<
string
>
&
kernelNames
)
{
Platform
*
best
=
0
;
vector
<
Platform
*>&
platforms
=
getPlatforms
();
double
speed
=
0.0
;
...
...
@@ -197,7 +197,7 @@ vector<string> Platform::loadPluginsFromDirectory(string directory) {
return
loadedLibraries
;
}
string
Platform
::
getDefaultPluginsDirectory
()
{
const
string
&
Platform
::
getDefaultPluginsDirectory
()
{
char
*
dir
=
getenv
(
"OPENMM_PLUGIN_DIR"
);
#ifdef _MSC_VER
if
(
dir
!=
NULL
)
...
...
@@ -207,8 +207,10 @@ string Platform::getDefaultPluginsDirectory() {
return
"C:
\\\\
Program Files
\\
OpenMM
\\
lib
\\
plugins"
;
return
string
(
dir
)
+
"
\\
OpenMM
\\
lib
\\
plugins"
;
#else
static
string
directory
;
if
(
dir
==
NULL
)
return
"/usr/local/openmm/lib/plugins"
;
return
string
(
dir
);
directory
=
"/usr/local/openmm/lib/plugins"
;
directory
=
string
(
dir
);
return
directory
;
#endif
}
openmmapi/include/openmm/AndersenThermostat.h
View file @
bf2a390b
...
...
@@ -48,14 +48,16 @@ public:
* This is the name of the parameter which stores the current temperature of the
* heat bath (in Kelvin).
*/
static
std
::
string
Temperature
()
{
return
"AndersenTemperature"
;
static
const
std
::
string
&
Temperature
()
{
static
const
std
::
string
key
=
"AndersenTemperature"
;
return
key
;
}
/**
* This is the name of the parameter which store the current collision frequency (in 1/ps).
*/
static
std
::
string
CollisionFrequency
()
{
return
"AndersenCollisionFrequency"
;
static
const
std
::
string
&
CollisionFrequency
()
{
static
const
std
::
string
key
=
"AndersenCollisionFrequency"
;
return
key
;
}
/**
* Create an AndersenThermostat.
...
...
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