Error using mutate.py with charmm FF

Hello,
I experience some issues while going through your tutorial for mutation free energies. When I run the mutate.py command with the amber or opls FF everything works fine. However, when i select one of the charmm FFs i get an error:

Traceback (most recent call last):
  File "/home/appuser/pmx/src/pmx/scripts/mutate.py", line 583, in <module>
    entry_point()
  File "/home/appuser/pmx/src/pmx/scripts/mutate.py", line 579, in entry_point
    main(args)
  File "/home/appuser/pmx/src/pmx/scripts/mutate.py", line 558, in main
    mutate(m=m,
  File "/opt/conda/envs/myenv/lib/python3.8/site-packages/pmx/alchemy.py", line 81, in mutate
    apply_aa_mutation(m=m2, residue=residue, new_aa_name=new_aa_name,
  File "/opt/conda/envs/myenv/lib/python3.8/site-packages/pmx/alchemy.py", line 121, in apply_aa_mutation
    _set_conformation(residue, hybrid_res, rotdic)
  File "/opt/conda/envs/myenv/lib/python3.8/site-packages/pmx/alchemy.py", line 546, in _set_conformation
    atom.x = old_res[atom.name].x
  File "/opt/conda/envs/myenv/lib/python3.8/site-packages/pmx/molecule.py", line 120, in __getitem__
    return self.fetch(item)[0]
IndexError: list index out of range

When i use the webinterface I can successfully generate a hybrid structure and topology file with the charmm FF. Any idea why this is not working locally?

Best,
Marc

It seems that atom names in the structure file do not match those in the charmm force field. pmx webserver runs several scripts to rename atoms/residues, so mutation functions properly later on. You could run your structure file through “gmx pdb2gmx” with charmm ff and use the output structure as an input for pmx

Thanks for the reply, this makes sense. However, pdb2gmx is also not able to convert the peptide.pdb file from the tutorial using the charmm FF (Residue type 'NASN' not found in residue topology database).
Are the scripts that the webserver is using for the renaming available for offline usage?
Best,
Marc

Several scripts were now added to the pmx ‘develop’ branch, they might help with preparing the structures