volkamerlab / opencadd

A Python library for structural cheminformatics
https://opencadd.readthedocs.io
MIT License
89 stars 18 forks source link

Only MDAnalysis superpose alghorithms worked while MMLigner and TheseusAligner did not. #154

Open njbamboo opened 1 year ago

njbamboo commented 1 year ago

I just ran the code given in HP to do the structural superposition. In three algorithms, only MDAnalysis worked well. When I tried the other two methods, it gave me same error messages when running the following codes:

from opencadd.structure.superposition.engines.mmligner import MMLignerAligner

mmligner = MMLignerAligner()
results = mmligner.calculate([structure1, structure2])

error messages:

OSError Traceback (most recent call last) File :4

File ~/miniconda3/envs/cadd/lib/python3.8/site-packages/opencadd/structure/superposition/engines/base.py:30, in BaseAligner.calculate(self, structures, *args, kwargs) 12 def calculate(self, structures, *args, *kwargs): 13 """ 14 Compute superposition for given structures 15 (...) 28 29 """ ---> 30 self._safety_checks() 31 assert ( 32 len(structures) == 2, 33 "This method can only be used for two structures at the same time, for now", 34 ) 35 return self._calculate(structures, args, kwargs) File ~/miniconda3/envs/cadd/lib/python3.8/site-packages/opencadd/structure/superposition/engines/mmligner.py:73, in MMLignerAligner._safety_checks(self) 71 mmligner = find_executable("mmligner") 72 if mmligner is None: ---> 73 raise OSError("mmligner cannot be located. Is it installed?")

OSError: mmligner cannot be located. Is it installed?

from opencadd.structure.superposition.engines.theseus import TheseusAligner
dry_aligner = TheseusAligner(statistics_only=True)
dry_aligner.calculate([structure1, structure2_onemodel])

error messages: ... File ~/miniconda3/envs/cadd/lib/python3.8/site-packages/opencadd/structure/superposition/engines/theseus.py:72, in TheseusAligner._safety_checks(self) 70 theseus = find_executable("theseus") 71 if theseus is None: ---> 72 raise OSError("theseus cannot be located. Is it installed?")

OSError: theseus cannot be located. Is it installed?


I installed opencadd by conda install opencadd=1.0.1 to update old version 0.2.2, which installed when I install teachopencadd by conda install teachopencadd Both ver0.2.2 and v1.0.1 had the same error messages. I installed opencadd in both windows10 and windows wsl system. Same errors.