Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load trajectory file from Desmond for two small molecules. #1690

Closed
kurokawaikki opened this issue Nov 11, 2021 · 3 comments
Closed
Labels

Comments

@kurokawaikki
Copy link

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.

@mattwthompson
Copy link
Member

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.

@kurokawaikki
Copy link
Author

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!

@stale
Copy link

stale bot commented Jul 31, 2022

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 stale bot added the wontfix label Jul 31, 2022
@stale stale bot closed this as completed Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants