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
e391509f
"vscode:/vscode.git/clone" did not exist on "0abd720e69d7c93dd9bcd1eea0bf9da52488270c"
Commit
e391509f
authored
Jul 10, 2009
by
Michael Sherman
Browse files
Fix some MSVC compiler warnings and a bug in the MSVC case for getDefaultPluginsDirectory().
parent
bf2a390b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
olla/src/Platform.cpp
olla/src/Platform.cpp
+4
-4
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+5
-5
No files found.
olla/src/Platform.cpp
View file @
e391509f
...
@@ -199,15 +199,15 @@ vector<string> Platform::loadPluginsFromDirectory(string directory) {
...
@@ -199,15 +199,15 @@ vector<string> Platform::loadPluginsFromDirectory(string directory) {
const
string
&
Platform
::
getDefaultPluginsDirectory
()
{
const
string
&
Platform
::
getDefaultPluginsDirectory
()
{
char
*
dir
=
getenv
(
"OPENMM_PLUGIN_DIR"
);
char
*
dir
=
getenv
(
"OPENMM_PLUGIN_DIR"
);
static
string
directory
;
#ifdef _MSC_VER
#ifdef _MSC_VER
if
(
dir
!=
NULL
)
if
(
dir
!=
NULL
)
return
string
(
dir
)
;
return
directory
=
dir
;
dir
=
getenv
(
"PROGRAMFILES"
);
dir
=
getenv
(
"PROGRAMFILES"
);
if
(
dir
==
NULL
)
if
(
dir
==
NULL
)
return
"C:
\\\\
Program Files
\\
OpenMM
\\
lib
\\
plugins"
;
return
directory
=
"C:
\\\\
Program Files
\\
OpenMM
\\
lib
\\
plugins"
;
return
string
(
dir
)
+
"
\\
OpenMM
\\
lib
\\
plugins"
;
return
directory
=
(
string
(
dir
)
+
"
\\
OpenMM
\\
lib
\\
plugins"
)
;
#else
#else
static
string
directory
;
if
(
dir
==
NULL
)
if
(
dir
==
NULL
)
directory
=
"/usr/local/openmm/lib/plugins"
;
directory
=
"/usr/local/openmm/lib/plugins"
;
directory
=
string
(
dir
);
directory
=
string
(
dir
);
...
...
platforms/cuda/src/CudaKernels.cpp
View file @
e391509f
...
@@ -310,16 +310,16 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
...
@@ -310,16 +310,16 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
double
my
=
boxVectors
[
1
][
1
]
/
force
.
getCutoffDistance
();
double
my
=
boxVectors
[
1
][
1
]
/
force
.
getCutoffDistance
();
double
mz
=
boxVectors
[
2
][
2
]
/
force
.
getCutoffDistance
();
double
mz
=
boxVectors
[
2
][
2
]
/
force
.
getCutoffDistance
();
double
pi
=
3.1415926535897932385
;
double
pi
=
3.1415926535897932385
;
int
kmaxx
=
std
::
ceil
(
-
(
mx
/
pi
)
*
std
::
log
(
ewaldErrorTol
));
int
kmaxx
=
(
int
)
std
::
ceil
(
-
(
mx
/
pi
)
*
std
::
log
(
ewaldErrorTol
));
int
kmaxy
=
std
::
ceil
(
-
(
my
/
pi
)
*
std
::
log
(
ewaldErrorTol
));
int
kmaxy
=
(
int
)
std
::
ceil
(
-
(
my
/
pi
)
*
std
::
log
(
ewaldErrorTol
));
int
kmaxz
=
std
::
ceil
(
-
(
mz
/
pi
)
*
std
::
log
(
ewaldErrorTol
));
int
kmaxz
=
(
int
)
std
::
ceil
(
-
(
mz
/
pi
)
*
std
::
log
(
ewaldErrorTol
));
if
(
kmaxx
%
2
==
0
)
if
(
kmaxx
%
2
==
0
)
kmaxx
++
;
kmaxx
++
;
if
(
kmaxy
%
2
==
0
)
if
(
kmaxy
%
2
==
0
)
kmaxy
++
;
kmaxy
++
;
if
(
kmaxz
%
2
==
0
)
if
(
kmaxz
%
2
==
0
)
kmaxz
++
;
kmaxz
++
;
gpuSetEwaldParameters
(
gpu
,
alpha
,
kmaxx
,
kmaxy
,
kmaxz
);
gpuSetEwaldParameters
(
gpu
,
(
float
)
alpha
,
kmaxx
,
kmaxy
,
kmaxz
);
method
=
EWALD
;
method
=
EWALD
;
}
}
data
.
nonbondedMethod
=
method
;
data
.
nonbondedMethod
=
method
;
...
@@ -572,7 +572,7 @@ void CudaIntegrateVariableVerletStepKernel::execute(OpenMMContextImpl& context,
...
@@ -572,7 +572,7 @@ void CudaIntegrateVariableVerletStepKernel::execute(OpenMMContextImpl& context,
gpuSetConstants
(
gpu
);
gpuSetConstants
(
gpu
);
prevErrorTol
=
errorTol
;
prevErrorTol
=
errorTol
;
}
}
float
maxStepSize
=
maxTime
-
data
.
time
;
float
maxStepSize
=
(
float
)(
maxTime
-
data
.
time
)
;
kSelectVerletStepSize
(
gpu
,
maxStepSize
);
kSelectVerletStepSize
(
gpu
,
maxStepSize
);
kVerletUpdatePart1
(
gpu
);
kVerletUpdatePart1
(
gpu
);
kApplyFirstShake
(
gpu
);
kApplyFirstShake
(
gpu
);
...
...
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