Optimisation Demo Fails
serbulent-av opened this issue · 3 comments
serbulent-av commented
Hi,
Optmisation demo produces error during relaxation.
# python -m api.optimize
0%| | 0/1 [00:00<?, ?it/s]
2023-06-02 08:31:14::INFO::Openmm relaxing...
0%| | 0/1 [00:14<?, ?it/s]
Traceback (most recent call last):
File "/opt/conda/envs/dyMEAN/envs/dyMEAN1/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/envs/dyMEAN/envs/dyMEAN1/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/serbulent_antiverse_io/code/dyMEAN/api/optimize.py", line 223, in <module>
optimize(
File "/home/serbulent_antiverse_io/code/dyMEAN/api/optimize.py", line 194, in optimize
openmm_relax(mod_pdb, mod_pdb,
File "/home/serbulent_antiverse_io/code/dyMEAN/utils/relax.py", line 74, in openmm_relax
modeller.addHydrogens(force_field)
File "/opt/conda/envs/dyMEAN/envs/dyMEAN1/lib/python3.8/site-packages/openmm/app/modeller.py", line 998, in addHydrogens
system = forcefield.createSystem(newTopology, rigidWater=False, nonbondedMethod=CutoffNonPeriodic)
File "/opt/conda/envs/dyMEAN/envs/dyMEAN1/lib/python3.8/site-packages/openmm/app/forcefield.py", line 1218, in createSystem
templateForResidue = self._matchAllResiduesToTemplates(data, topology, residueTemplates, ignoreExternalBonds)
File "/opt/conda/envs/dyMEAN/envs/dyMEAN1/lib/python3.8/site-packages/openmm/app/forcefield.py", line 1433, in _matchAllResiduesToTemplates
raise ValueError('No template found for residue %d (%s). %s For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template' % (res.index+1, res.name, _findMatchErrors(self, res)))
ValueError: No template found for residue 10 (LEU). The set of atoms matches CLEU, but the bonds are different. For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template
kxz18 commented
Looks like it is because I extract the epitope into a PDB for openmm relaxing, which causes some errors on the template matching because of the discontinuous segments. I'm trying to figure out a solution.
kxz18 commented
Hi, it should work now. I have to put the entire antigen into the compound for openmm relax, which will be slower but will not have the "no template found" problem again.
serbulent-av commented
Thank you very much it seems problem solved.