Acellera / moleculekit

MoleculeKit: Your favorite molecule manipulation kit
Other
200 stars 37 forks source link

systemprepare error #92

Closed MaciejMajew closed 2 years ago

MaciejMajew commented 2 years ago

I'm getting this error while using systemprepare vith 1.0.7 version of moleculekit

     23 mut.mutateResidue("chain D and resid "+resid, resname)
     24 
---> 25 prep = systemPrepare(mut, pH=7.4)
     26 prep.set("segid", "IL2", sel="segid P0")
     27 prep.set("segid", "IL2B", sel="segid P1")

/shared/maciej/SOFT/miniconda3/envs/htmd2.0.2/lib/python3.7/site-packages/moleculekit/tools/preparation.py in systemPrepare(mol_in, titration, pH, force_protonation, no_opt, no_prot, no_titr, hold_nonpeptidic_bonds, verbose, return_details, hydrophobic_thickness, plot_pka, ignore_ns_errors, _logger_level, _molkit_ff, outdir)
    668     mol_orig = mol_in.copy()
    669 
--> 670     definition, forcefield = _get_custom_ff(molkit_ff=_molkit_ff)
    671     definition, forcefield = _generate_nonstandard_residues_ff(
    672         mol_in,

/shared/maciej/SOFT/miniconda3/envs/htmd2.0.2/lib/python3.7/site-packages/moleculekit/tools/preparation_customres.py in _get_custom_ff(user_ff, molkit_ff)
    315         from pdb2pqr import forcefield
    316 
--> 317         definition = get_definitions(aa_path=out_aa)
    318         ff = forcefield.Forcefield("parse", definition, out_dat, None)
    319     return definition, ff

/shared/maciej/SOFT/miniconda3/envs/htmd2.0.2/lib/python3.7/site-packages/pdb2pqr/io.py in get_definitions(aa_path, na_path, patch_path)
    491             with open(patch_path_, "rt") as patch_file:
    492                 definitions = defns.Definition(
--> 493                     aa_file=aa_file, na_file=na_file, patch_file=patch_file
    494                 )
    495     return definitions

/shared/maciej/SOFT/miniconda3/envs/htmd2.0.2/lib/python3.7/site-packages/pdb2pqr/definitions.py in __init__(self, aa_file, na_file, patch_file)
    155                 resnames = list(self.map.keys())
    156                 for name in resnames:
--> 157                     regexp = re.compile(patch.applyto).match(name)
    158                     if not regexp:
    159                         continue

TypeError: expected string or bytes-like object
stefdoerr commented 2 years ago

Pretty sure that's an old pdb2pqr version. Can you do conda list pdb2pqr?

MaciejMajew commented 2 years ago
# packages in environment at /shared/maciej/SOFT/miniconda3/envs/htmd2.0.2:
#
# Name                    Version                   Build  Channel
pdb2pqr                   3.5.0                    pypi_0    pypi
stefdoerr commented 2 years ago

you need 3.5.2+11 version from conda acellera channel