-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Hi Lester, hope you are well and sorry to bother you!
One of our collaborators would like to use position restraints in somd-freenrg.
And I just have a quick question regarding this.
Summary:
runFreeNrg() with position restraints fail because the properties in a different format than expected by the integrator initialization.
runFreeNrg() use setupPositionalRestraints() via PositionalRestraintsToProperty creates properties like: Anchor(0), Atom(0), k(0), nrestrainedatoms.
However, this error showed : AtomNum(0), was looked seems by atomNumVectorListToProperty and propertyToAtomNumVectorList expected, which is not what we created.
So raise an error:
Traceback (most recent call last):
File "/home/fredpowell/anaconda3/envs/a3fe/share/Sire/scripts/somd-freenrg.py", line 224, in <module>
OpenMMMD.runFreeNrg(params)
File "/home/fredpowell/anaconda3/envs/a3fe/lib/python3.12/site-packages/sire/legacy/Tools/__init__.py", line 175, in inner
retval = func()
^^^^^^
File "/home/fredpowell/anaconda3/envs/a3fe/lib/python3.12/site-packages/sire/legacy/Tools/OpenMMMD.py", line 2834, in runFreeNrg
moves = setupMovesFreeEnergy(system, debug_seed.val, gpu.val, lambda_val.val)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fredpowell/anaconda3/envs/a3fe/lib/python3.12/site-packages/sire/legacy/Tools/OpenMMMD.py", line 2158, in setupMovesFreeEnergy
Integrator_OpenMM.initialise()
KeyError: 'SireBase::missing_property: There is no property with name "AtomNum(0)". Available properties are [ Atom(15), Atom(5), k(8), Anchor(8), k(9), k(2), Anchor(10), k(14), Anchor(4), k(7), Atom(6), Anchor(9), k(16), Atom(2), Anchor(0), Atom(14), Anchor(16), nrestrainedatoms, Atom(11), Anchor(1), Anchor(2), Anchor(12), Anchor(6), k(0), Anchor(13), Atom(1), k(10), Atom(10), Atom(4), Atom(13), k(1), k(11), Atom(7), Atom(8), k(15), k(6), Anchor(5), Atom(16), k(4), Anchor(14), k(13), Atom(12), Anchor(11), Anchor(3), k(3), Anchor(7), k(12), Atom(3), Atom(0), k(5), Anchor(15), Atom(9) ]. (call sire.error.get_last_error_details() for more info)'
srun: error: BarkerGroup: task 0: Exited with exit code 1
The restrain setting in somd.cfg :
restrained atoms = {38387: 454, 38388: 810, 38389: 1942, 38390: 2123, 38391: 2198, 38392: 2287, 38393: 2302, 38394: 2319, 38395: 2326, 38396: 2434, 38397: 2809, 38398: 2860, 38399: 2879, 38400: 2932, 38401: 2951, 38402: 2995, 38403: 3012}
restraint force constant = 2750
Is something related Integrator_OpenMM.initialise() to use propertyToAtomNumVectorList ?
I Try to clear myself:
runFreeNrg()
├── setupPositionalRestraints() # ✅ create new properties
├── setupForceFieldsFreeEnergy() # ✅ setup FF
├── setupMovesFreeEnergy() # ← error
└── Integrator_OpenMM.initialise()
Probably C++:
Integrator_OpenMM.initialise()
↓ (somehow)
Python: propertyToAtomNumVectorList()
↓
Python: prop["AtomNum(0)"] # Error!
Sorry for my messy explanation. I’m still trying to figure it out, but it’s quite difficult for me. Hope you can help me if you have some time.
Thank you very very much!
Best Wishes,
Roy