mdtraj icon indicating copy to clipboard operation
mdtraj copied to clipboard

Cannot load trajectory file from Desmond for two small molecules.

Open kurokawaikki opened this issue 4 years ago • 3 comments

Hi, I am new to mdtraj. I performed MD with desmond. But, when I try to use mdtraj to analyze it. The out.cms file (topology from desmond) cannot be recognized by the mdtraj... I tried to convert the .cms to mol2 with VMD. But, it turned out the column of the atom is 9 instead of 7 that is recognizable by the mdtraj. I created a script to remove the additional column. However, another error was raised

`Traceback (most recent call last): File "D:\DATA\Python\MD_analysis\BBM.py", line 6, in t = md.load(SCHRODINGER+'desmond_md_job_9/desmond_md_job_9_trj', top=SCHRODINGER+'Structures_2.mol2') File "D:\Anaconda\envs\MDtraj\lib\site-packages\mdtraj\core\trajectory.py", line 377, in load kwargs["top"] = _parse_topology(kwargs["top"], **topkwargs) File "D:\Anaconda\envs\MDtraj\lib\site-packages\mdtraj\core\trajectory.py", line 177, in _parse_topology topology = load_mol2(top, **kwargs).topology File "D:\Anaconda\envs\MDtraj\lib\site-packages\mdtraj\formats\mol2.py", line 119, in load_mol2 atoms_mdtraj["element"] = atoms.atype.apply(to_element) File "D:\Anaconda\envs\MDtraj\lib\site-packages\pandas\core\series.py", line 4357, in apply return SeriesApply(self, func, convert_dtype, args, kwargs).apply() File "D:\Anaconda\envs\MDtraj\lib\site-packages\pandas\core\apply.py", line 1043, in apply return self.apply_standard() File "D:\Anaconda\envs\MDtraj\lib\site-packages\pandas\core\apply.py", line 1098, in apply_standard mapped = lib.map_infer( File "pandas_libs\lib.pyx", line 2859, in pandas._libs.lib.map_infer File "D:\Anaconda\envs\MDtraj\lib\site-packages\mdtraj\formats\mol2.py", line 109, in to_element if '.' in x: # orbital-hybridizations in SYBL TypeError: argument of type 'int' is not iterable

Process finished with exit code 1 `

I got stuck at the beginning of reading trajectory How could I use mdtraj to analyze Desmond MD files?

The main point I try to use mdtraj is that Desmond did not allow me to analysis the trajectory with the binding of two small molecules. It force me to use one protein and one ligand... I want to analyze two small molecules instead. Thank you very much for your help.

kurokawaikki avatar Nov 11 '21 02:11 kurokawaikki

As a passing comment: there are many different MOL2 formats masquerading as the same thing, it looks like there are differences between what VMD wrote and what MDTraj expects/hopes for. It might be simplest to try a different file for the topology argument.

mattwthompson avatar Nov 11 '21 16:11 mattwthompson

Thank you very much for your answer. I converted it into .gro. It can be imported but the bond information was lost. Is this ok to perform further analysis. I saw that in the tutorial .h5 was used which contained bond information with coordinates. Or what can I do to retrieve the bond information? Than you very much again!

kurokawaikki avatar Nov 17 '21 02:11 kurokawaikki

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 01:07 stale[bot]