Commit 3a88177a authored by peastman's avatar peastman
Browse files

Merge pull request #1236 from peastman/parameters

Added Context::getParameters()
parents 0f1c973d 244d595f
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for * * Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. * * Medical Research, grant U54 GM072970. See https://simtk.org. *
* * * *
* Portions copyright (c) 2008-2013 Stanford University and the Authors. * * Portions copyright (c) 2008-2015 Stanford University and the Authors. *
* Authors: Peter Eastman * * Authors: Peter Eastman *
* Contributors: * * Contributors: *
* * * *
...@@ -165,6 +165,11 @@ public: ...@@ -165,6 +165,11 @@ public:
* @param randomSeed the random number seed to use when selecting velocities * @param randomSeed the random number seed to use when selecting velocities
*/ */
void setVelocitiesToTemperature(double temperature, int randomSeed=osrngseed()); void setVelocitiesToTemperature(double temperature, int randomSeed=osrngseed());
/**
* Get all adjustable parameters that have been defined by Force objects in the System, along
* with their current values.
*/
const std::map<std::string, double>& getParameters() const;
/** /**
* Get the value of an adjustable parameter defined by a Force object in the System. * Get the value of an adjustable parameter defined by a Force object in the System.
* *
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for * * Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. * * Medical Research, grant U54 GM072970. See https://simtk.org. *
* * * *
* Portions copyright (c) 2008-2013 Stanford University and the Authors. * * Portions copyright (c) 2008-2015 Stanford University and the Authors. *
* Authors: Peter Eastman * * Authors: Peter Eastman *
* Contributors: * * Contributors: *
* * * *
...@@ -201,6 +201,10 @@ void Context::setVelocitiesToTemperature(double temperature, int randomSeed) { ...@@ -201,6 +201,10 @@ void Context::setVelocitiesToTemperature(double temperature, int randomSeed) {
impl->applyVelocityConstraints(1e-5); impl->applyVelocityConstraints(1e-5);
} }
const map<string, double>& Context::getParameters() const {
return impl->getParameters();
}
double Context::getParameter(const string& name) const { double Context::getParameter(const string& name) const {
return impl->getParameter(name); return impl->getParameter(name);
} }
......
...@@ -308,6 +308,7 @@ UNITS = { ...@@ -308,6 +308,7 @@ UNITS = {
("AmoebaWcaDispersionForce", "getShctd") : ( None, ()), ("AmoebaWcaDispersionForce", "getShctd") : ( None, ()),
("Context", "getParameter") : (None, ()), ("Context", "getParameter") : (None, ()),
("Context", "getParameters") : (None, ()),
("Context", "getMolecules") : (None, ()), ("Context", "getMolecules") : (None, ()),
("CMAPTorsionForce", "getMapParameters") : (None, (None, 'unit.kilojoule_per_mole')), ("CMAPTorsionForce", "getMapParameters") : (None, (None, 'unit.kilojoule_per_mole')),
("CMAPTorsionForce", "getTorsionParameters") : (None, ()), ("CMAPTorsionForce", "getTorsionParameters") : (None, ()),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment