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
1d3ffd7b
"plugins/amoeba/vscode:/vscode.git/clone" did not exist on "21ab511a59dc28926ebc1c335ad134b79f6a0a7d"
Commit
1d3ffd7b
authored
Feb 20, 2015
by
peastman
Browse files
Deleted obsolete logging class
parent
9111cca0
Changes
35
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
11 additions
and
365 deletions
+11
-365
platforms/reference/src/SimTKReference/ReferenceDynamics.cpp
platforms/reference/src/SimTKReference/ReferenceDynamics.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceForce.cpp
platforms/reference/src/SimTKReference/ReferenceForce.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceHarmonicBondIxn.cpp
...reference/src/SimTKReference/ReferenceHarmonicBondIxn.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceLJCoulomb14.cpp
...rms/reference/src/SimTKReference/ReferenceLJCoulomb14.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp
...ms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp
+3
-6
platforms/reference/src/SimTKReference/ReferenceLincsAlgorithm.cpp
.../reference/src/SimTKReference/ReferenceLincsAlgorithm.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferencePairIxn.cpp
platforms/reference/src/SimTKReference/ReferencePairIxn.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceProperDihedralBond.cpp
...erence/src/SimTKReference/ReferenceProperDihedralBond.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceRbDihedralBond.cpp
.../reference/src/SimTKReference/ReferenceRbDihedralBond.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceStochasticDynamics.cpp
...erence/src/SimTKReference/ReferenceStochasticDynamics.cpp
+4
-21
platforms/reference/src/SimTKReference/ReferenceVariableStochasticDynamics.cpp
...rc/SimTKReference/ReferenceVariableStochasticDynamics.cpp
+4
-21
platforms/reference/src/SimTKReference/ReferenceVariableVerletDynamics.cpp
...ce/src/SimTKReference/ReferenceVariableVerletDynamics.cpp
+0
-1
platforms/reference/src/SimTKReference/ReferenceVerletDynamics.cpp
.../reference/src/SimTKReference/ReferenceVerletDynamics.cpp
+0
-1
platforms/reference/src/SimTKUtilities/SimTKOpenMMLog.cpp
platforms/reference/src/SimTKUtilities/SimTKOpenMMLog.cpp
+0
-306
platforms/reference/src/SimTKUtilities/SimTKOpenMMUtilities.cpp
...rms/reference/src/SimTKUtilities/SimTKOpenMMUtilities.cpp
+0
-1
No files found.
platforms/reference/src/SimTKReference/ReferenceDynamics.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceDynamics.h"
...
...
platforms/reference/src/SimTKReference/ReferenceForce.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceForce.h"
...
...
platforms/reference/src/SimTKReference/ReferenceHarmonicBondIxn.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceHarmonicBondIxn.h"
#include "ReferenceForce.h"
...
...
platforms/reference/src/SimTKReference/ReferenceLJCoulomb14.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceLJCoulomb14.h"
#include "ReferenceForce.h"
...
...
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp
View file @
1d3ffd7b
...
...
@@ -28,11 +28,11 @@
#include <algorithm>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceLJCoulombIxn.h"
#include "ReferenceForce.h"
#include "ReferencePME.h"
#include "openmm/OpenMMException.h"
// In case we're using some primitive version of Visual Studio this will
// make sure that erf() and erfc() are defined.
...
...
@@ -264,11 +264,8 @@ void ReferenceLJCoulombIxn::calculateEwaldIxn(int numberOfAtoms, vector<RealVec>
vector
<
d_complex
>
tab_xy
(
numberOfAtoms
);
vector
<
d_complex
>
tab_qxyz
(
numberOfAtoms
);
if
(
kmax
<
1
)
{
std
::
stringstream
message
;
message
<<
" kmax < 1 , Aborting"
<<
std
::
endl
;
SimTKOpenMMLog
::
printError
(
message
);
}
if
(
kmax
<
1
)
throw
OpenMMException
(
"kmax for Ewald summation < 1"
);
for
(
int
i
=
0
;
(
i
<
numberOfAtoms
);
i
++
)
{
for
(
int
m
=
0
;
(
m
<
3
);
m
++
)
...
...
platforms/reference/src/SimTKReference/ReferenceLincsAlgorithm.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMUtilities.h"
#include "SimTKOpenMMLog.h"
#include "ReferenceLincsAlgorithm.h"
#include "ReferenceDynamics.h"
#include "openmm/OpenMMException.h"
...
...
platforms/reference/src/SimTKReference/ReferencePairIxn.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceForce.h"
#include "ReferencePairIxn.h"
...
...
platforms/reference/src/SimTKReference/ReferenceProperDihedralBond.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceProperDihedralBond.h"
#include "ReferenceForce.h"
...
...
platforms/reference/src/SimTKReference/ReferenceRbDihedralBond.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceRbDihedralBond.h"
#include "ReferenceForce.h"
...
...
platforms/reference/src/SimTKReference/ReferenceStochasticDynamics.cpp
View file @
1d3ffd7b
...
...
@@ -26,10 +26,10 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceStochasticDynamics.h"
#include "ReferenceVirtualSites.h"
#include "openmm/OpenMMException.h"
#include <cstdio>
...
...
@@ -51,27 +51,10 @@ ReferenceStochasticDynamics::ReferenceStochasticDynamics( int numberOfAtoms,
RealOpenMM
deltaT
,
RealOpenMM
tau
,
RealOpenMM
temperature
)
:
ReferenceDynamics
(
numberOfAtoms
,
deltaT
,
temperature
),
_tau
(
tau
)
{
// ---------------------------------------------------------------------------------------
static
const
char
*
methodName
=
"
\n
ReferenceStochasticDynamics::ReferenceStochasticDynamics"
;
static
const
RealOpenMM
zero
=
0.0
;
static
const
RealOpenMM
one
=
1.0
;
// ---------------------------------------------------------------------------------------
// ensure tau is not zero -- if it is print warning message
if
(
_tau
==
zero
){
if
(
tau
<=
0
)
{
std
::
stringstream
message
;
message
<<
methodName
;
message
<<
" input tau value="
<<
tau
<<
" is invalid -- setting to 1."
;
SimTKOpenMMLog
::
printError
(
message
);
_tau
=
one
;
message
<<
"illegal tau value: "
<<
tau
;
throw
OpenMMException
(
message
.
str
());
}
xPrime
.
resize
(
numberOfAtoms
);
inverseMasses
.
resize
(
numberOfAtoms
);
...
...
platforms/reference/src/SimTKReference/ReferenceVariableStochasticDynamics.cpp
View file @
1d3ffd7b
...
...
@@ -27,10 +27,10 @@
#include <algorithm>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceVariableStochasticDynamics.h"
#include "ReferenceVirtualSites.h"
#include "openmm/OpenMMException.h"
#include <cstdio>
...
...
@@ -53,27 +53,10 @@ ReferenceVariableStochasticDynamics::ReferenceVariableStochasticDynamics( int nu
RealOpenMM
tau
,
RealOpenMM
temperature
,
RealOpenMM
accuracy
)
:
ReferenceDynamics
(
numberOfAtoms
,
0.0
f
,
temperature
),
_tau
(
tau
),
_accuracy
(
accuracy
)
{
// ---------------------------------------------------------------------------------------
static
const
char
*
methodName
=
"
\n
ReferenceVariableStochasticDynamics::ReferenceVariableStochasticDynamics"
;
static
const
RealOpenMM
zero
=
0.0
;
static
const
RealOpenMM
one
=
1.0
;
// ---------------------------------------------------------------------------------------
// ensure tau is not zero -- if it is print warning message
if
(
_tau
==
zero
){
if
(
tau
<=
0
)
{
std
::
stringstream
message
;
message
<<
methodName
;
message
<<
" input tau value="
<<
tau
<<
" is invalid -- setting to 1."
;
SimTKOpenMMLog
::
printError
(
message
);
_tau
=
one
;
message
<<
"illegal tau value: "
<<
tau
;
throw
OpenMMException
(
message
.
str
());
}
xPrime
.
resize
(
numberOfAtoms
);
inverseMasses
.
resize
(
numberOfAtoms
);
...
...
platforms/reference/src/SimTKReference/ReferenceVariableVerletDynamics.cpp
View file @
1d3ffd7b
...
...
@@ -27,7 +27,6 @@
#include <algorithm>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceVariableVerletDynamics.h"
#include "ReferenceVirtualSites.h"
...
...
platforms/reference/src/SimTKReference/ReferenceVerletDynamics.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h"
#include "SimTKOpenMMUtilities.h"
#include "ReferenceVerletDynamics.h"
#include "ReferenceVirtualSites.h"
...
...
platforms/reference/src/SimTKUtilities/SimTKOpenMMLog.cpp
deleted
100644 → 0
View file @
9111cca0
/* Portions copyright (c) 2006 Stanford University and Simbios.
* Contributors: Pande Group
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "SimTKOpenMMLog.h"
#include <stdlib.h>
#include "openmm/OpenMMException.h"
using
namespace
OpenMM
;
// static settings
SimTKOpenMMLog
*
SimTKOpenMMLog
::
_simTKOpenMMLog
=
NULL
;
/**---------------------------------------------------------------------------------------
SimTKOpenMMLog constructor (Simbios)
@param logFile file reference for logging
--------------------------------------------------------------------------------------- */
SimTKOpenMMLog
::
SimTKOpenMMLog
(
FILE
*
logFile
)
:
_logFile
(
logFile
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::SimTKOpenMMLog";
// ---------------------------------------------------------------------------------------
_logLevel
=
LogLowLevel
;
}
/**---------------------------------------------------------------------------------------
SimTKOpenMMLog destructor (Simbios)
--------------------------------------------------------------------------------------- */
SimTKOpenMMLog
::~
SimTKOpenMMLog
(
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::~SimTKOpenMMLog";
// ---------------------------------------------------------------------------------------
}
/**---------------------------------------------------------------------------------------
Get LogFile
@return logFile
--------------------------------------------------------------------------------------- */
FILE
*
SimTKOpenMMLog
::
getLogFile
(
void
)
const
{
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::getLogFile";
// ---------------------------------------------------------------------------------------
return
_logFile
;
}
/**---------------------------------------------------------------------------------------
Set LogFile
@param input logFile
--------------------------------------------------------------------------------------- */
void
SimTKOpenMMLog
::
setLogFile
(
FILE
*
logFile
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::setLogFile";
// ---------------------------------------------------------------------------------------
_logFile
=
logFile
;
}
/**---------------------------------------------------------------------------------------
Set LogLevel
@param input logLevel
--------------------------------------------------------------------------------------- */
void
SimTKOpenMMLog
::
setLogLevel
(
SimTKOpenMMLog
::
LogLevels
logLevel
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::setLogLevel";
// ---------------------------------------------------------------------------------------
_logLevel
=
logLevel
;
}
/**---------------------------------------------------------------------------------------
SimTKOpenMMLog log message to log (Simbios)
@param message message to log
--------------------------------------------------------------------------------------- */
void
SimTKOpenMMLog
::
logMessage
(
const
std
::
stringstream
&
message
)
const
{
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::logMessage";
// ---------------------------------------------------------------------------------------
if
(
_logFile
){
// (void) fprintf( stderr, "%s", message.str().c_str() );
// (void) fflush( stderr );
(
void
)
fprintf
(
_logFile
,
"%s"
,
message
.
str
().
c_str
()
);
(
void
)
fflush
(
_logFile
);
}
}
/**---------------------------------------------------------------------------------------
Set global simTKOpenMMLog (Simbios)
@param logFile file to log to
@return new SimTKOpenMMLog
--------------------------------------------------------------------------------------- */
SimTKOpenMMLog
*
SimTKOpenMMLog
::
setSimTKOpenMMLog
(
FILE
*
logFile
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::setSimTKOpenMMLog";
// ---------------------------------------------------------------------------------------
// allow for multiple logs
/*
if( _simTKOpenMMLog ){
delete _simTKOpenMMLog;
}
*/
_simTKOpenMMLog
=
new
SimTKOpenMMLog
(
logFile
);
return
_simTKOpenMMLog
;
}
/**---------------------------------------------------------------------------------------
Get global simTKOpenMMLog -- static method (Simbios)
@return static member
--------------------------------------------------------------------------------------- */
SimTKOpenMMLog
*
SimTKOpenMMLog
::
getSimTKOpenMMLog
(
void
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::getSimTKOpenMMLog";
// ---------------------------------------------------------------------------------------
if
(
!
_simTKOpenMMLog
){
_simTKOpenMMLog
=
new
SimTKOpenMMLog
(
);
}
return
_simTKOpenMMLog
;
}
/**---------------------------------------------------------------------------------------
Get global simTKOpenMMLog (Simbios)
@return FILE reference
--------------------------------------------------------------------------------------- */
FILE
*
SimTKOpenMMLog
::
getSimTKOpenMMLogFile
(
void
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::getSimTKOpenMMLogFile";
// ---------------------------------------------------------------------------------------
SimTKOpenMMLog
*
simTKOpenMMLog
=
getSimTKOpenMMLog
(
);
return
simTKOpenMMLog
->
getLogFile
();
}
/**---------------------------------------------------------------------------------------
Static method to print message (Simbios)
@param message message to log
--------------------------------------------------------------------------------------- */
void
SimTKOpenMMLog
::
printMessage
(
const
std
::
stringstream
&
message
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::printMessage";
// ---------------------------------------------------------------------------------------
if
(
_simTKOpenMMLog
){
_simTKOpenMMLog
->
logMessage
(
message
);
}
else
{
(
void
)
fprintf
(
stderr
,
"%s"
,
message
.
str
().
c_str
()
);
(
void
)
fflush
(
stderr
);
}
}
/**---------------------------------------------------------------------------------------
Static method to print warning message (Simbios)
If global _simTKOpenMMLog is not set, then print to stderr
@param message message to log
--------------------------------------------------------------------------------------- */
void
SimTKOpenMMLog
::
printWarning
(
const
std
::
stringstream
&
message
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::printWarning";
// ---------------------------------------------------------------------------------------
if
(
_simTKOpenMMLog
){
std
::
stringstream
messageWithHeader
;
messageWithHeader
<<
"Warning: "
<<
message
.
str
();
_simTKOpenMMLog
->
logMessage
(
messageWithHeader
);
}
else
{
(
void
)
fprintf
(
stderr
,
"Warning: %s"
,
message
.
str
().
c_str
()
);
}
}
/**---------------------------------------------------------------------------------------
Static method to print error message and exit program (Simbios)
If global _simTKOpenMMLog is not set, then print to stderr
@param message message to log
--------------------------------------------------------------------------------------- */
void
SimTKOpenMMLog
::
printError
(
const
std
::
stringstream
&
message
){
// ---------------------------------------------------------------------------------------
// static const std::string methodName = "\nSimTKOpenMMLog::printError";
// ---------------------------------------------------------------------------------------
std
::
stringstream
messageWithHeader
;
messageWithHeader
<<
"Error: "
<<
message
.
str
();
if
(
_simTKOpenMMLog
){
_simTKOpenMMLog
->
logMessage
(
messageWithHeader
);
}
else
{
(
void
)
fprintf
(
stderr
,
"%s"
,
messageWithHeader
.
str
().
c_str
()
);
(
void
)
fflush
(
stderr
);
}
throw
OpenMM
::
OpenMMException
(
messageWithHeader
.
str
());
}
platforms/reference/src/SimTKUtilities/SimTKOpenMMUtilities.cpp
View file @
1d3ffd7b
...
...
@@ -26,7 +26,6 @@
#include "openmm/internal/OSRngSeed.h"
#include "SimTKOpenMMUtilities.h"
#include "SimTKOpenMMLog.h"
#include "sfmt/SFMT.h"
// fabs(), ...
...
...
Prev
1
2
Next
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