Sire
Sire copied to clipboard
Can't manipulate system loaded from SOMD s3 restart file
In reference to this BioSimSpace issue:
How do you actually load and use the streamed Sire system? I've followed what's done in OpenMMMD.py, but get errors whenever I try to do anything to the system, e.g.:
from Sire.Stream import load
# Load a binary restart file.
system, _ = load("/tmp/tmpo5lhzy3c/sim_restart.s3")
# Print the system.
print(system)
System( name=, nForceFields=6, nMolecules=631 nMonitors()=1 )
# Try to get the molecule numbers. (Or do pretty much anything else.)
system.molNums()
This results in the following error:
UserWarning: Exception 'SireError::program_bug' thrown by the thread 'master'.
There is a problem - the parent forcefield of molecules:molecules (7) is null!
Thrown from FILE: /home/lester/Code/Sire/corelib/src/libs/SireFF/ffmolgroup.cpp, LINE: 144, FUNCTION: void SireFF::detail::FFMolGroupPvt::assertNotNull() const
__Backtrace__
( 0) /home/lester/sire.app/lib/libSireError.so.2019 ([0x7f178da3aec2] ++0x42)
-- SireError::getBackTrace()
( 1) /home/lester/sire.app/lib/libSireError.so.2019 ([0x7f178da379d6] ++0xa6)
-- SireError::exception::exception(QString, QString)
/home/lester/sire.app/lib/libSireFF.so.2019(+0x758b0) [0x7f17357098b0]
( 3) /home/lester/sire.app/lib/libSireFF.so.2019 ([0x7f17357175a3] ++0x1e3)
-- SireFF::detail::FFMolGroupPvt::assertNotNull() const
( 4) /home/lester/sire.app/lib/libSireFF.so.2019 ([0x7f1735717738] ++0x28)
-- SireFF::FFMolGroup::FFMolGroup(SireFF::detail::FFMolGroupPvt const&)
( 5) /home/lester/sire.app/lib/libSireFF.so.2019 ([0x7f17357177c3] ++0x23)
-- SireFF::detail::FFMolGroupPvt::clone() const
( 6) /home/lester/sire.app/lib/libSireBase.so.2019 ([0x7f1760b06612] ++0x32)
-- SireBase::PropPtrBase::PropPtrBase(SireBase::Property const&)
( 7) /home/lester/sire.app/lib/libSireMol.so.2019 ([0x7f1735b05fa3] ++0xb3)
-- SireMol::MolGroupsBase::selectAll() const
( 8) /home/lester/sire.app/lib/libSireMol.so.2019 ([0x7f1735b0611e] ++0x1e)
-- SireMol::MolGroupsBase::groups() const
( 9) /home/lester/sire.app/lib/libSireMol.so.2019 ([0x7f1735b0ccdc] ++0x4c)
-- SireMol::MolGroupsBase::getMoleculeNumbers() const
( 10) /home/lester/sire.app/lib/libSireMol.so.2019 ([0x7f1735b0d16e] ++0x1e)
-- SireMol::MolGroupsBase::molNums() const
/home/lester/sire.app/lib/python3.7/site-packages/Sire/Mol/_Mol.so(+0x82de85) [0x7f1736b86e85]
( 12) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427442d] ++0x29d)
-- boost::python::objects::function::call(_object*, _object*) const
/home/lester/sire.app/lib/libboost_python37.so.1.67.0(+0x20599) [0x7f1784274599]
( 14) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427aceb] ++0x6b)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/rdkit/Chem/rdmolfiles.so(+0x53c94) [0x7f17462b9c94]
( 16) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/rdkit/Chem/rdchem.so(+0x10fd54) [0x7f17488e6d54]
( 18) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/rdkit/Chem/rdchem.so(+0xbf0c4) [0x7f17488960c4]
( 20) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/rdkit/rdBase.so(+0x54d34) [0x7f1761f92d34]
( 22) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/rdkit/rdBase.so(+0x54c54) [0x7f1761f92c54]
( 24) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/rdkit/rdBase.so(+0x54c04) [0x7f1761f92c04]
( 26) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/Sire/Error/_Error.so(+0x2aa3) [0x7f178da24aa3]
( 28) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427acba] ++0x3a)
-- boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
/home/lester/sire.app/lib/python3.7/site-packages/Sire/Error/_Error.so(+0x2a61) [0x7f178da24a61]
( 30) /home/lester/sire.app/lib/libboost_python37.so.1.67.0 ([0x7f178427aa6f] ++0x3f)
-- boost::python::handle_exception_impl(boost::function0<void>)
/home/lester/sire.app/lib/libboost_python37.so.1.67.0(+0x1dd2a) [0x7f1784271d2a]
( 32) /home/lester/sire.app/bin/python ([0x55772b79f46b] ++0x49b)
-- _PyObject_FastCallKeywords
( 33) /home/lester/sire.app/bin/python ([0x55772b7f9d26] ++0x5266)
-- _PyEval_EvalFrameDefault
( 34) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 35) /home/lester/sire.app/bin/python ([0x55772b73afa4] ++0x44)
-- PyEval_EvalCodeEx
( 36) /home/lester/sire.app/bin/python ([0x55772b73afcc] ++0x1c)
-- PyEval_EvalCode
/home/lester/sire.app/bin/python(+0x1df8ad) [0x55772b8048ad]
( 38) /home/lester/sire.app/bin/python ([0x55772b79eca9] ++0xe9)
-- _PyMethodDef_RawFastCallKeywords
( 39) /home/lester/sire.app/bin/python ([0x55772b79ef41] ++0x21)
-- _PyCFunction_FastCallKeywords
( 40) /home/lester/sire.app/bin/python ([0x55772b7f91f4] ++0x4734)
-- _PyEval_EvalFrameDefault
( 41) /home/lester/sire.app/bin/python ([0x55772b797e52] ++0x2a2)
-- _PyGen_Send
( 42) /home/lester/sire.app/bin/python ([0x55772b7f64b6] ++0x19f6)
-- _PyEval_EvalFrameDefault
( 43) /home/lester/sire.app/bin/python ([0x55772b797e52] ++0x2a2)
-- _PyGen_Send
( 44) /home/lester/sire.app/bin/python ([0x55772b7f64b6] ++0x19f6)
-- _PyEval_EvalFrameDefault
( 45) /home/lester/sire.app/bin/python ([0x55772b797e52] ++0x2a2)
-- _PyGen_Send
( 46) /home/lester/sire.app/bin/python ([0x55772b79ec4c] ++0x8c)
-- _PyMethodDef_RawFastCallKeywords
( 47) /home/lester/sire.app/bin/python ([0x55772b79efaf] ++0x4f)
-- _PyMethodDescr_FastCallKeywords
( 48) /home/lester/sire.app/bin/python ([0x55772b7f96a1] ++0x4be1)
-- _PyEval_EvalFrameDefault
( 49) /home/lester/sire.app/bin/python ([0x55772b79decb] ++0xfb)
-- _PyFunction_FastCallKeywords
( 50) /home/lester/sire.app/bin/python ([0x55772b7f51a6] ++0x6e6)
-- _PyEval_EvalFrameDefault
( 51) /home/lester/sire.app/bin/python ([0x55772b79decb] ++0xfb)
-- _PyFunction_FastCallKeywords
( 52) /home/lester/sire.app/bin/python ([0x55772b7f4ff0] ++0x530)
-- _PyEval_EvalFrameDefault
( 53) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 54) /home/lester/sire.app/bin/python ([0x55772b79e157] ++0x387)
-- _PyFunction_FastCallKeywords
( 55) /home/lester/sire.app/bin/python ([0x55772b7f5fa1] ++0x14e1)
-- _PyEval_EvalFrameDefault
-- _PyEval_EvalFrameDefault
( 56) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 57) /home/lester/sire.app/bin/python ([0x55772b79e0f5] ++0x325)
-- _PyFunction_FastCallKeywords
( 58) /home/lester/sire.app/bin/python ([0x55772b7f4ff0] ++0x530)
-- _PyEval_EvalFrameDefault
( 59) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 60) /home/lester/sire.app/bin/python ([0x55772b79e0f5] ++0x325)
-- _PyFunction_FastCallKeywords
( 61) /home/lester/sire.app/bin/python ([0x55772b7f4ff0] ++0x530)
-- _PyEval_EvalFrameDefault
( 62) /home/lester/sire.app/bin/python ([0x55772b79decb] ++0xfb)
-- _PyFunction_FastCallKeywords
( 63) /home/lester/sire.app/bin/python ([0x55772b7f4ff0] ++0x530)
-- _PyEval_EvalFrameDefault
( 64) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 65) /home/lester/sire.app/bin/python ([0x55772b73b3bc] ++0x3dc)
-- _PyFunction_FastCallDict
( 66) /home/lester/sire.app/bin/python ([0x55772b752473] ++0x63)
-- _PyObject_Call_Prepend
( 67) /home/lester/sire.app/bin/python ([0x55772b74719e] ++0x6e)
-- PyObject_Call
( 68) /home/lester/sire.app/bin/python ([0x55772b7f69ff] ++0x1f3f)
-- _PyEval_EvalFrameDefault
( 69) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 70) /home/lester/sire.app/bin/python ([0x55772b79e157] ++0x387)
-- _PyFunction_FastCallKeywords
( 71) /home/lester/sire.app/bin/python ([0x55772b7f51a6] ++0x6e6)
-- _PyEval_EvalFrameDefault
( 72) /home/lester/sire.app/bin/python ([0x55772b73a0d9] ++0x2f9)
-- _PyEval_EvalCodeWithName
( 73) /home/lester/sire.app/bin/python ([0x55772b73afa4] ++0x44)
-- PyEval_EvalCodeEx
( 74) /home/lester/sire.app/bin/python ([0x55772b73afcc] ++0x1c)
-- PyEval_EvalCode
/home/lester/sire.app/bin/python(+0x22f664) [0x55772b854664]
( 76) /home/lester/sire.app/bin/python ([0x55772b85e881] ++0xa1)
-- PyRun_FileExFlags
( 77) /home/lester/sire.app/bin/python ([0x55772b85ea73] ++0x1c3)
-- PyRun_SimpleFileExFlags
/home/lester/sire.app/bin/python(+0x23ab2f) [0x55772b85fb2f]
( 79) /home/lester/sire.app/bin/python ([0x55772b85fc4c] ++0x3c)
-- _Py_UnixMain
( 80) /usr/lib/libc.so.6 ([0x7f179026bee3] ++0xf3)
-- __libc_start_main
/home/lester/sire.app/bin/python(+0x1df982) [0x55772b804982]
__EndTrace__
Exception 'SireError::program_bug' thrown by the thread 'master'.
There is a problem - the parent forcefield of molecules:molecules (7) is null!
Thrown from FILE: /home/lester/Code/Sire/corelib/src/libs/SireFF/ffmolgroup.cpp, LINE: 144, FUNCTION: void SireFF::detail::FFMolGroupPvt::assertNotNull() const
I've now modified OpenMMMD.py so that it also saves a binary AMBER RST coordinate file called latest.rst after each cycle so I can use that in combination with the original topology file to get the latest system instead.