Acellera / htmd

HTMD: Programming Environment for Molecular Discovery
https://software.acellera.com/docs/latest/htmd/index.html
Other
258 stars 59 forks source link

problem in the systemPrepare function with new version #1094

Open matteagle2 opened 2 months ago

matteagle2 commented 2 months ago

Hi,

I have a problem with the systemPrepare function since I installed the new version. When I switched to another environment which still had an older version of HTMD installed the error did not occur. Any help would be very much appreciated.:)

The script I am usig for building:

from htmd.ui import *                        #Python based env to prepare, simulate systems
from moleculekit.util import maxDistance     #Python library for manipulation of structures. 
import glob
import os

protein = Molecule('../proteins/1jh9_test.pdb')
protein = systemPrepare(protein,pH=7.4) 
protein = autoSegment(protein, sel='protein')

ligand = Molecule('../ligands_preparation/1jh9/HPA.mol2')
ligand.set('segid','L')
ligand.set('resname' , 'MOL')

mol = Molecule(name='combo')
mol.append(protein)
mol.append(ligand)
mol.reps.add(sel='protein', style='NewCartoon', color='Secondary Structure')
mol.reps.add(sel='resname MOL', style='Licorice')
mol.center()

D = maxDistance(mol, 'all') # let's find the maximum distance from 0,0,0
print(f'max distance is: {D}')
DW = D + 8 # We add a buffer of 8 around the peptide 
smol = solvate(mol, minmax=[[-DW, -DW, -DW], [DW, DW, DW]])

topos_amber = amber.defaultTopo() + ['../ligands_preparation/1jh9/HPA.mol2']
frcmods_amber = amber.defaultParam() + ['../ligands_preparation/1jh9/HPA.frcmod']

bmol_amber = amber.build(smol,outdir='1jh9_DNA_build_test',topo=topos_amber, param=frcmods_amber, saltconc=0.15)

and the error message:

---- Molecule chain report ----
Chain A:
    First residue: ALA     2  
    Final residue: ARG   340  
Chain B:
    First residue: DA    699  
    Final residue: DT    715  
---- End of chain report ----

Traceback (most recent call last):
  File "/agh/scratch/Boje/MD/diverse_scaffold_generation/building/build_batches.py", line 11, in <module>
    protein = systemPrepare(protein,pH=7.4) 
  File "/agh/projects/users/Merve/miniconda3/envs/acemd/lib/python3.10/site-packages/moleculekit/tools/preparation.py", line 733, in systemPrepare
    definition, forcefield = _get_custom_ff(molkit_ff=_molkit_ff)
  File "/agh/projects/users/Merve/miniconda3/envs/acemd/lib/python3.10/site-packages/moleculekit/tools/preparation_customres.py", line 415, in _get_custom_ff
    definition = get_definitions(aa_path=out_aa)
  File "/sw/sci/app/pdb2pqr/3.1.0-focal/lib/python3.8/site-packages/pdb2pqr/io.py", line 492, in get_definitions
    definitions = defns.Definition(
  File "/sw/sci/app/pdb2pqr/3.1.0-focal/lib/python3.8/site-packages/pdb2pqr/definitions.py", line 157, in __init__
    regexp = re.compile(patch.applyto).match(name)
stefdoerr commented 2 months ago

Hey, if you look at the traceback of the error you can see that you have a messed up PYTHONPATH. It's using pdb2pqr from /sw/sci/app/pdb2pqr instead of using the one in /agh/projects/users/Merve/miniconda3/envs/acemd/. That's most definitely a different version from the one we are using in HTMD