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