Commit 1486a99d authored by Yutong Zhao's avatar Yutong Zhao
Browse files

Fixed deserializeState interface to take in a string (so it is consistent with...

Fixed deserializeState interface to take in a string (so it is consistent with that of deserializeSystem)
parent 6371f855
......@@ -259,9 +259,10 @@ Parameters:
return buffer.str();
}
static PyObject* _deserializeStringIntoLists(const std::string &filename) {
std::fstream stateFile(filename.c_str(), std::ios::in);
OpenMM::State* deserializedState = OpenMM::XmlSerializer::deserialize<OpenMM::State>(stateFile);
static PyObject* _deserializeStringIntoLists(const std::string &stateAsString) {
std::stringstream ss;
ss << stateAsString;
OpenMM::State* deserializedState = OpenMM::XmlSerializer::deserialize<OpenMM::State>(ss);
PyObject* obj = _convertStateToLists(*deserializedState);
delete deserializedState;
return obj;
......
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