Dear all,
I am trying to unwrap my atoms and I get two errors:
>> NoDataError: AtomGroup.fragments not available; this requires bonds
>> ...
>> AttributeError: ... has no fragments
How did I get here:
- I am simulating a salt into a liquid solvent (namely TFSI+ and diglyme)
- both molecules pdb files, as well as the relative force field were downloaded from LigParGen. I added the force field to oplsaa.ff
- I am renaming the fragments with arbitrary names
- Solvent was multiplied with "gmx insert-molecules" to assure a good initial pressure
- The pdb file, centered in the cubic box does unwrap.
- The problem arises when I solvate the salt into the solvent, therefore I guess the problem is in my diglyme
How can I imposes bonds on a molecule? Or I just have to define fragments, and how to do so? Or is it just a gromacs error?
Below, you can find the commands which I have followed and the full error.
Thank you
Marco
"""
gro = 'em.gro'
trj = 'em.trr'
u = mda.Universe(gro, trj)
transformations.unwrap(u.atoms)
"""
--------------------------------------------------------------------------- NoDataError Traceback (most recent call last) ~/anaconda3/lib/python3.8/site-packages/MDAnalysis/transformations/wrap.py in unwrap(ag) 136 try: --> 137 ag.fragments 138 except AttributeError:~/anaconda3/lib/python3.8/site-packages/MDAnalysis/core/groups.py in __getattr__(self, attr) 2329 raise NoDataError('This Universe has no coordinates') -> 2330 return super(AtomGroup, self).__getattr__(attr) 2331 ~/anaconda3/lib/python3.8/site-packages/MDAnalysis/core/groups.py in __getattr__(self, attr) 598 else: --> 599 return super(GroupBase, self).__getattr__(attr) 600 ~/anaconda3/lib/python3.8/site-packages/MDAnalysis/core/groups.py in __getattr__(self, attr) 377 'this requires {topattr}') --> 378 raise NoDataError(err.format(selfcls=selfcls, 379 attrname=attrname,NoDataError: AtomGroup.fragments not available; this requires bonds During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) <ipython-input-40-ca67e8253a63> in <module> 12 13 u = mda.Universe(gro, trj) ---> 14 transformations.unwrap(u.atoms) ~/anaconda3/lib/python3.8/site-packages/MDAnalysis/transformations/wrap.py in unwrap(ag) 137 ag.fragments 138except AttributeError: --> 139 raise AttributeError("{} has no fragments".format(ag)) 140141 def wrapped(ts): AttributeError: <AtomGroup [<Atom 1: O00 of type O of resname TFS, resid 1 and segid SYSTEM>, <Atom 2: S01 of type S of resname TFS, resid 1 and segid SYSTEM>, <Atom 3: O02 of type O of resname TFS, resid 1 and segid SYSTEM>, ..., <Atom 934: H0M of type H of resname DIG, resid 41 and segid SYSTEM>, <Atom 935: H0N of type H of resname DIG, resid 41 and segid SYSTEM>, <Atom 936: LI of type LI of resname LI, resid 42 and segid SYSTEM>]> has no fragments
------------------------------------
Marco Di Gennaro, Ph.D.
Toyota Motor Europe NV/SA
Technical Center
Hoge Wei 33
B- 1930 Zaventem
Belgium