Giter Club home page Giter Club logo

protocaller's Introduction

ProtoCaller

About

ProtoCaller is a Python library which enables controlled automation of relative protein-ligand binding free energy calculations in GROMACS. ProtoCaller uses a variety of tools to automate the free energy calculation process, such as: Biopython, BioSimSpace, CHARMM-GUI, (optionally) Modeller, Open Babel, ParmEd, PDB2PQR, pdbfixer, RDKit.

ProtoCaller can be run on both Linux and macOS. Installation is easy and performed through Conda. Please check the other sections for further information.

Installation

This package is distributed via Conda. To install it, run the following command:

conda install -c conda-forge -c omnia -c michellab -c essexlab protocaller

The development version can be installed with this command (use with caution):

conda install -c conda-forge -c omnia -c michellab -c essexlab/label/dev protocaller

The newest version (1.2.0) is highly recommended due to recent database overhauls in the Protein Data Bank.

Getting Started

Full docstring documentation can be found here. There are also a few examples which you can run to see how ProtoCaller works.

protocaller's People

Contributors

kexul avatar msuruzhon avatar tsenapathi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

protocaller's Issues

Parametrisation without morphs

Hello,

I would like to use your (amazing) tool to prepare (remove alternative conformation, protonate, add missing residues, and atoms) and parameterized my protein-ligand system for simple unbiased simulations and later ABFE.

However, it does not seem possible to generate the files if morphs are not supplied. Since I am not aiming (yet) to perform relative calculations, I was wondering if it would be possible to use protocaller without supplying morphs.

Many thanks in advance,

Performing Free Energy Calculations failed

It seems like there were some bugs in ProtoCaller/Utils/fileio.py , when I run the 'Performing Free Energy Calculation' example, the error raised.

Traceback (most recent call last):
  File "run.py", line 41, in <module>
    with workdir:
  File "/root/anaconda3/envs/uii/lib/python3.7/site-packages/ProtoCaller/Utils/fileio.py", line 69, in __enter__
    _os.makedirs(self.dirname)
  File "/root/anaconda3/envs/uii/lib/python3.7/os.py", line 223, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

I ran the code by : python run.py --mode bound --workdir /root/proto/kinase/2OJ9/mola~molb/ , the kinase directory were generated by protocaller, and there were complex_final.gro and complex_final.top files in the mola~molb directory.

Memory usage constantly growing with the number of perturbations.

Here is the code I used:

gands = Chem.SDMolSupplier('CDK2_ligands.sdf')
pair = pd.read_csv('CDK2_pertu.csv', comment='#', names=['p1', 'p2', 'ddg', 'error'])

with Dir('CDK2', overwrite=False):
    mol_dict = {}
    for item in gands:
        lig_name = item.GetProp('_Name')
        mol_dict[lig_name] = Ligand(item, protonated=True, minimise=False, name=lig_name, workdir='Ligands', parametrised_files=[f'{lig_name}.prmtop', f'{lig_name}.inpcrd'])
    pairs = []
    for _, row in pair.iterrows():
        pairs.append([mol_dict[row.p1], mol_dict[row.p2]])

    protein = Protein('4EOR', ligand_ref='301')
    system = Ensemble(protein=protein, morphs=pairs, box_length_complex=8, workdir='Protein', ligand_ff='gaff2')
    system.protein.filter(ligands=None, waters='all')
    system.protein.prepare()
    system.protein.parametrise()
    system.prepareComplexes()

The memory of this program used constantly grew with the number of perturbations generated. I had >40 perturbations in the csv, the program was killed when about 20 perturbations was generated in my 8 GB memory machine.

Here is the input files I used:
cdk2.zip

error: unrecognized arguments: - q u i e t

Hi,
It's a useful tool. While I got some problem, and the following is details:

(base) [hcl@hcl-pc examples]$ python DHFR.py 


/home/hcl/miniconda3/lib/python3.7/site-packages/ProtoCaller/__init__.py:31: UserWarning: Cannot find MPI binary for the current operating system.
  _warnings.warn("Cannot find MPI binary for the current operating system.")
INFO:numexpr.utils:NumExpr defaulting to 4 threads.
INFO:root:Parametrising ligand Cl_H...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand H_H...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand OMe...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand NO2...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand Br...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand Me_Me...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand Me_H...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
INFO:root:Parametrising ligand Cl_Cl...
INFO:root:Running OpenBabel... 
INFO:root:Running antechamber... 
INFO:root:Running parmchk2... 
INFO:root:Running tleap... 
Generating input files for 5HPB...
INFO:root:Downloading ligand files from the Protein Data Bank...
usage: DHFR.py [-h] [-f FILENAMES] [-r REFERENCE] [-c CHAINS]
               [-i TITRATE_ONLY] [-t THERMOPHILES] [-a ALIGNMENT]
               [-m MUTATIONS] [-v VERSION_LABEL] [-p PARAMETERS]
               [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-o PH]
               [-w WINDOW WINDOW WINDOW] [-g GRID GRID GRID]
               [--mutator MUTATOR] [--mutator-option MUTATOR_OPTIONS] [-d]
               [-l] [-k] [-q] [--generate-propka-input] [--protonate-all]
               input_pdb
DHFR.py: error: unrecognized arguments: - q u i e t
(base) [hcl@hcl-pc examples]$ 

ValueError: could not convert string to float

When specify an ref ligand with it's ID in pdbbank , this error occured: ValueError: could not convert string to float: 'I1'.
Here is the code to reproduce the error:

protein = Protein('3eyg', ligand_ref='MI1')

Here is the corresponding ligand part in the pdb file:
图片

Is that a wrong usage of ligand_ref parameter? I've noticed that in the example, a residual name was required, when I use protein = Protein('3eyg', ligand_ref='1') , the error was ValueError: Molecule ID not found: 1. I tried A1 and the same error occured.

What should be the correct representation for this ligand?

My current solution is extract the ligand from the cocrystal and save it as a sdf file, create a Ligand object and pass it to the Protein function.

Thanks!

Hydration free energy example request

Hi, thanks for your great work! I'm a newbee to molecular simulation, I'm searching high-level tools through Github to perform a hydration free energy calculation. Here I found that Yank and this repo should be adequate. Would you please give a hydration free energy example? Thanks in andvance.

ValueError: The number of FASTA sequences does not match the number of chains

Hi, I tried to prepare the system for protein '4E4N' and encountered this error: ValueError: The number of FASTA sequences does not match the number of chains.

Here is the minimum code to reproduce that:

with Dir('SYSTEM', overwrite=True):
        # create a protein from its PDB code and the residue number of the ligand
        # we are going to use for mapping
        protein_proto = Protein('4e4n', ligand_ref='1201')

Any help is appreciated!

minimise not take effect when protonated was set to True

Here is the code to reproduce:

lig = Ligand('test1.sdf', protonated=True, minimise=True)
lig.parametrise()

Here is the sdf file I used, which is 2D structure.
test1.zip

The generated inpcrd file and mol2 file is 2D, though minimise is set to True (3D structure was expected).

In Ligand.py, the parametrise function only take effect on self.protonated_filename . It may be better if self.molecule is parametrised.

def parametrise(self, params=None, molecule_type="ligand", id=None, reparametrise=False):
        """
        Parametrises the ligand using ProtoCaller.Parametrise.

        Parameters
        ----------
        params : ProtoCaller.Parametrise.Params
            Force field parameters.
        molecule_type : str
            The type of the molecule. One of: "ligand" and "cofactor".
        id : str
            The name of the molecule. Default: equal to the ligand name.
        reparametrise : bool
            Whether to reparametrise an already parametrised ligand.
        """
        with self.workdir:
            if self._parametrised and not reparametrise:
                _logging.debug("Ligand %s is already parametrised." % self.name)
                return

            _logging.info("Parametrising ligand %s..." % self.name)
            if not self.protonated:
                _logging.warning("Cannot parametrise unprotonated ligand. Protonating first with default parameters...")
                self.protonate()

            if params is None:
                params = _parametrise.Params()

            # we convert the protonated file into a pdb so that antechamber can read it
            filename = _babel.babelTransform(self.protonated_filename, "pdb")
            if id is None: id = self.name

            charge = _rdmolops.GetFormalCharge(self.molecule)
            self.parametrised_files = _parametrise.parametriseFile(params=params, filename=filename,
                                                                   molecule_type=molecule_type, id=id, charge=charge)

An input file contains a line longer than 4095 characters

Hi, my PDBId is 6h3k, I used protocaller to prepare my system. In minimization, gmx grompp raised an error:
Fatal error: An input file contains a line longer than 4095 characters, while the buffer passed to fgets2 has size 4095. The line starts with: ' 4134 4135 '

Here is my complex_final.top generated by protocaller, in line 9461, there are many @ characters.

complex_final.zip

Select chain from polymer

I would like to keep the chain with ligand bound to it, I have check the pdb file and know that's chain A, so I filtered everything else.

This is the code I use:

with Dir('test_case'):
        protein = Protein('6vn6', ligand_ref='601')
        for chain in protein.pdb_obj:
            for residual in chain:
                atoms_to_purge = [x for x in residual if x.altLoc != 'A']
                residual.purgeAtoms(atoms_to_purge, 'discard')
        protein.pdb_obj.writePDB()

which raised an error:

  File "/root/repo/prepare/teth_validate.py", line 184, in clear
    protein.pdb_obj.writePDB()
  File "/data/FEP/prepare/ProtoCaller/IO/PDB/__init__.py", line 131, in writePDB
    total_residue_list = self.totalResidueList()
  File "/data/FEP/prepare/ProtoCaller/IO/PDB/__init__.py", line 371, in totalResidueList
    total_res = self.missing_residues + self.filter("type in ['amino_acid', 'amino_acid_modified']")
  File "/data/FEP/prepare/ProtoCaller/IO/PDB/__init__.py", line 251, in filter
    add(residue)
  File "/data/FEP/prepare/ProtoCaller/IO/PDB/__init__.py", line 234, in add
    if eval("elem" + "." + condition, globals(), vars()):
  File "<string>", line 1, in <module>
  File "/data/FEP/prepare/ProtoCaller/IO/PDB/Residue.py", line 41, in __getattr__
    raise AttributeError("Invalid attribute: {}. Needs to be one of: {}".format(item, self._common_properties))
AttributeError: Invalid attribute: type. Needs to be one of: ['chainID', 'resName', 'resSeq', 'iCode']

When I use

atoms_to_purge = [x for x in residual if x.altLoc == 'B']

everything works fine.

In my case, I don't know which chains should be dropped but which chain should be kept.

If I got a tetramer, how to keep the specific chain which bounded by ligand?

Thanks !

How to specify GPU ID ?

Dear all,

I run the code on a machine that has 3 GPU. By default Gromacs run on all GPU which in my case is far from ideal and brings down the performances. Is there any ways to specify the GPU to be used ?

Cheers

H bond constraint

Hi, recently I read a paper Best Practices for Alchemical Free Energy Calculations, which said that:

One issue which requires particular care is the use of constraints. Commonly, bonds involving hydrogen are constrained to a fixed length using algorithms such as SHAKE or LINCS, allowing the use of longer timesteps . However, in single topology relative free energy calculations, the atoms involved might be mutated to other atom types for example, in a mutation of methane to methanol, one hydrogen might become an oxygen atom. Typical molecular dynamics engines are not set up to recognize this change, or at least not to correctly include contributions to the free energy from changing constraints/constraint length, so results for a transformation would usually be erroneous. At present the most general solution to this problem is simply to avoid the use of constraints (and thus use a smaller timestep if necessary, usually of around 1 fs) in any relative free energy calculation involving a transformation of a constrained bond, as done by GROMACS.

I think decreasing the time step is easy to do in GROMACS, but how about avoid the use of constraints? Do I need to modify the topology file? Or should I set the constraints=none in mdp file? Have these things been handled when preparing the system by ProtoCaller?

Thanks!

The merge has opened/closed a ring

Hi, my PDB ID was 4R1V, with a reference ligand ID 1401. Here were my target molecules:

mol1: Fc1cc(F)cc(c1)C2=NN(Cc3cccc(NC(=O)OCCCN4CCOCC4)c3)C(=O)C=C2
mol2: CN(C)CCCOC(=O)Nc1cccc(CN2N=C(C=CC2=O)c3ccc(F)cc3)c1
They looked almost the same in most part of the molecule, but there is a ring breaking in the side chain.
image

When using ProtoCaller in my project, all of the perturbation containing ring open/close failed in mdrun: the system blow up with core dumped.

I tried to set allow_ring_breaking=False in the merge function of align molecule, the system generation stopped at BioSimSpace._Exceptions._exceptions.IncompatibleError: The merge has changed opened/closed a ring! If you want to allow this perturbation, then set the 'allow_ring_breaking' option to 'True'..

Are there some tricks to handle this kind of perturbation?

How to supply a custom pdb file (without pdb id) for protein?

I've followed the example, but an error raised:

/data/miniconda3/envs/uii/lib/python3.7/site-packages/ProtoCaller/__init__.py:31: UserWarning: Cannot find MPI binary for the current operating system.
  _warnings.warn("Cannot find MPI binary for the current operating system.")
INFO:numexpr.utils:NumExpr defaulting to 4 threads.
INFO:root:Running PDB2PQR... 
INFO:root:Running OpenBabel... 
INFO:root:Parametrising original crystal system...
Traceback (most recent call last):
  File "/root/prepare/prepare.py", line 205, in <module>
    test_case()
  File "/root/prepare/prepare.py", line 200, in test_case
    protein.parametrise()
  File "/data/miniconda3/envs/uii/lib/python3.7/site-packages/ProtoCaller/Ensemble/Protein.py", line 585, in parametrise
    hetatm_files, hetatm_types = self._pdb_obj.writeHetatms()
AttributeError: 'NoneType' object has no attribute 'writeHetatms'

Here is the minimum code to reproduce:

lig = Ligand('1h1q_protonated.sdf')
protein = Protein('aaa', pdb_file='CDK2_protein.pdb', ligand_ref=lig)
protein.filter(ligands=None, waters='all')
protein.prepare()
protein.parametrise()

Here is the file I used:
mds.zip

How to restore ligand from parametrised file?

Hi, this is the code I used to parametrise my ligand:

smiles = 'ClC1=CC(C2=CC=NC3=C2SC(C(CCl)(CO)O)=C3)=C4C(C[C@H](C(N5CCNCC5)=O)O4)=C1'
lig = Ligand(smiles, protonated=False, minimise=True, workdir='test_case')
lig.protonate()
lig.parametrise()

When I want to restore the ligand with already parametrised files,

smiles = 'ClC1=CC(C2=CC=NC3=C2SC(C(CCl)(CO)O)=C3)=C4C(C[C@H](C(N5CCNCC5)=O)O4)=C1'
lig = Ligand(smiles, protonated=False, minimise=True, workdir='test_case', parametrised_files=['ligand1.prmtop', 'ligand1.inpcrd'])
lig.protonate()
lig.parametrise()

I got an error:

[16:06:09] Explicit valence for atom # 30 N, 4, is greater than permitted
Traceback (most recent call last):
  File "/root/repo/prepare/teth_validate.py", line 184, in <module>
    lig = Ligand(smiles, protonated=False, minimise=True, workdir='test_case', parametrised_files=['ligand1.prmtop', 'ligand1.inpcrd'])
  File "/data/FEP/prepare/ProtoCaller/Ensemble/Ligand.py", line 56, in __init__
    template=input)
  File "/data/FEP/prepare/ProtoCaller/Wrappers/rdkitwrapper.py", line 194, in openAsRdkit
    mol = AssignBondOrdersFromTemplate(template, mol)
  File "/data/FEP/prepare/ProtoCaller/Wrappers/rdkitwrapper.py", line 296, in AssignBondOrdersFromTemplate
    _Chem.SanitizeMol(mol)
rdkit.Chem.rdchem.AtomValenceException: Explicit valence for atom # 30 N, 4, is greater than permitted

I tried set protonated=True and minimise=False, the error still exists.

Error while calling command 'antechamber'

I got a mol2 file with net charge +1, it could be properly parameterized by ProtoCaller, when I converted it to sdf, an error occurred.

OSError: Error while calling command 'antechamber'

Here is the original mol2 file and converted sdf file.
ligand.zip

Here is the code to reproduce:

lig = Ligand('ligand.sdf', protonated=True, minimise=True)
lig.parametrise()

Here is the code I've used to convert mol2 to sdf:

from rdkit import Chem 
mol = Chem.MolFromMol2File('ligand.mol2')
Chem.MolToMolFile(mol, 'ligand.sdf')

LINCS warning and structure clash

Hi, here is my transformation
image

here is the .gro and .top file generate by ProtoCaller,
morphs.zip

The minimization step seems fine, but, when running NVT, there are many LINCS warning, below are some of them:

Step 9209, time 9.209 (ps)  LINCS WARNING
relative constraint deviation after LINCS:
rms 0.000115, max 0.000551 (between atoms 47 and 58)
bonds that rotated more than 30 degrees:
 atom 1 atom 2  angle  previous, current, constraint length
     47     57   30.5    0.1097   0.1097      0.1097

Step 9210, time 9.21 (ps)  LINCS WARNING
relative constraint deviation after LINCS:
rms 0.000074, max 0.000297 (between atoms 35 and 49)
bonds that rotated more than 30 degrees:
 atom 1 atom 2  angle  previous, current, constraint length
     47     57   31.5    0.1097   0.1097      0.1097

When I check the gro file generate after NVT Equilibration, atom 49 and atom 43 are too close, which I think should not happen in reality.
image

Here is the .mdp file I used and .gro file generated after NVT Equilibration.
files.zip

Any clue what happened? Thanks in advance!

Invalid file format for file

Hi, here is the code I used:

pro = Protein('6TOL', ligand_ref='201')

which raised an error:

parmed.exceptions.FormatNotFound: Could not identify file format

ImportError: libnetcdf.so.13

Hi there,

I have tried to install ProtoCaller on a new machine and I am now confronted to the following. I have installed the package using the recommended conda command in a python 3.7 environnement.

ImportError                               Traceback (most recent call last)
<ipython-input-2-56575bd78640> in <module>
----> 1 import ProtoCaller

~/.conda/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/__init__.py in <module>
    119 with _warnings.catch_warnings():
    120     _warnings.filterwarnings("ignore")
--> 121     from . import Ensemble
    122     from . import IO
    123     from . import Morph

~/.conda/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Ensemble/__init__.py in <module>
      5 import ProtoCaller as _PC
      6 from .Ligand import Ligand
----> 7 from .Perturbation import Perturbation
      8 from .PerturbationList import PerturbationList
      9 from .Protein import Protein

~/.conda/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Ensemble/Perturbation.py in <module>
      3
      4 # TODO support the native Morph class when it becomes viable
----> 5 import BioSimSpace as _BSS
      6
      7 from .Ligand import Ligand as _Ligand

~/.conda/envs/protocaller/lib/python3.7/site-packages/BioSimSpace/__init__.py in <module>
    133
    134 from . import Align
--> 135 from . import FreeEnergy
    136 from . import Gateway
    137 from . import IO

~/.conda/envs/protocaller/lib/python3.7/site-packages/BioSimSpace/FreeEnergy/__init__.py in <module>
     33 """
     34
---> 35 from ._binding import *
     36 from ._solvation import *

~/.conda/envs/protocaller/lib/python3.7/site-packages/BioSimSpace/FreeEnergy/_binding.py in <module>
     24 """
     25
---> 26 from . import _free_energy
     27 from .._SireWrappers import System as _System
     28

~/.conda/envs/protocaller/lib/python3.7/site-packages/BioSimSpace/FreeEnergy/_free_energy.py in <module>
     31 from Sire.Base import getBinDir as _getBinDir
     32
---> 33 import Sire.IO as _SireIO
     34 import Sire.Mol as _SireMol
     35

~/.conda/envs/protocaller/lib/python3.7/site-packages/Sire/IO/__init__.py in <module>
     11
     12 # Import all of the classes and functions from the C++ library
---> 13 from Sire.IO._IO import *
     14
     15 # Now define some pure Python functions and classes that are part of

ImportError: libnetcdf.so.13: cannot open shared object file: No such file or directory

Installing error

Installing protocaller under conda on ubuntu 20.04, there appears the following error. How to resolve it. Your reply wound be very appreciated.

UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  • feature:/linux-64::__glibc==2.31=0
  • protocaller -> geckodriver -> __glibc[version='>=2.17,<3.0.a0']
  • python=3.9 -> libgcc-ng[version='>=10.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.31

Low GPU utilization with default protocol.

Hi, I managed to run the simulation with the system prepared by protocaller. I found that the GPU utilization is 3%~5% with my Tesla P40 card. Is that normal? Here is my log about time consuming.


     R E A L   C Y C L E   A N D   T I M E   A C C O U N T I N G

On 1 MPI rank, each using 40 OpenMP threads

 Computing:          Num   Num      Call    Wall time         Giga-Cycles
                     Ranks Threads  Count      (s)         total sum    %
-----------------------------------------------------------------------------
 Neighbor search        1   40        501       6.972        613.563   1.0
 Launch GPU ops.        1   40      50001       4.305        378.852   0.6
 Force                  1   40      50001     216.936      19090.346  30.5
 PME mesh               1   40      50001     364.126      32043.018  51.3
 Wait Bonded GPU        1   40       1001       0.007          0.574   0.0
 Wait GPU NB local      1   40      50001       0.760         66.924   0.1
 NB X/F buffer ops.     1   40      99501      20.326       1788.689   2.9
 Write traj.            1   40         11       0.262         23.098   0.0
 Update                 1   40     100002      46.367       4080.316   6.5
 Constraints            1   40     100004      44.149       3885.090   6.2
 Rest                                           6.218        547.217   0.9
-----------------------------------------------------------------------------
 Total                                        710.429      62517.687 100.0
-----------------------------------------------------------------------------
 Breakdown of PME mesh computation
-----------------------------------------------------------------------------
 PME spread             1   40     100002     118.548      10432.218  16.7
 PME gather             1   40     100002      94.478       8314.080  13.3
 PME 3D-FFT             1   40     200004     131.213      11546.690  18.5
 PME solve Elec         1   40     100002       1.376        121.094   0.2
-----------------------------------------------------------------------------

ions.mdp missing

Hi there,

When trying to run the code here https://protocaller.readthedocs.io/en/latest/Examples.T4-lysosyme.html I get the following error message (I'm using gromacs 2020.1):

INFO:root:Running gmx grompp...
Traceback (most recent call last):
  File "/usr/local/Caskroom/miniconda/base/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Utils/runexternal.py", line 30, in runExternal
    _subprocess.check_call(commands, shell=True, stdout=stdout, stderr=stderr)
  File "/usr/local/Caskroom/miniconda/base/envs/protocaller/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/Users/nmartin/software/gromacs-2020.1/build/bin/gmx grompp -f ions.mdp -p complex_waters.top -c complex_waters.gro -o "complex_solvated.tpr"',)' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "prepare.py", line 34, in <module>
    system.prepareComplexes()
  File "/usr/local/Caskroom/miniconda/base/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Ensemble/__init__.py", line 242, in prepareComplexes
    centre=self.centre, work_dir=curdir.path, filebase="complex")]
  File "/usr/local/Caskroom/miniconda/base/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Solvate/__init__.py", line 146, in solvate
    _runexternal.runExternal(command, procname="gmx grompp")
  File "/usr/local/Caskroom/miniconda/base/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Utils/runexternal.py", line 33, in runExternal
    raise OSError("Error while calling command '%s'" % procname)
OSError: Error while calling command 'gmx grompp'

ions.mdp is missing from my current folder but it seems odd not to specify any path to it or integrate it directly in the code.

Hope this helps, thanks a lot for the initiative !

Version update with new updated conda dependencies

Hello @msuruzhon, We have updated some package dependencies for protocaller in conda-forge.

  1. PDB2PQR (https://anaconda.org/conda-forge/pdb2pqr)- This version dropped the PDB2PKA/APBS support from within PDB2PQR (temporarily) to get the independent conda install.
  2. pypdb (https://anaconda.org/conda-forge/pypdb)
  3. propka (https://anaconda.org/conda-forge/propka)
    And some more...

Especially we need to change htmd-pdb2pqr to the officially supported pdb2pqr package. So can we update the dependencies, run the tests and release a new version?

Abnormal memory usage in protocaller

Hi, I installed the new 1.2.0 version of protocaller, It seems like there were some bug caused abnormal memory usage. The following code, which can run normally with old version, consumpt all of memory in my machine (8G), then killed by the system.

example_code.zip

running error

Thank for your ProtoCaller.
When I run python T4-lysozyme.py, there appears the following wrongs. Your reply would be very appreciated.
WARNING:openff.toolkit.utils.toolkit_registry:Warning: Unable to load toolkit 'OpenEye Toolkit'. The Open Force Field Toolkit does not require the OpenEye Toolkits, and can use RDKit/AmberTools instead. However, if you have a valid license for the OpenEye Toolkits, consider installing them for faster performance and additional file format support: https://docs.eyesopen.com/toolkits/python/quickstart-python/linuxosx.html OpenEye offers free Toolkit licenses for academics: https://www.eyesopen.com/academic-licensing
WARNING:root:Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
INFO:numexpr.utils:Note: detected 72 virtual cores but NumExpr set to maximum of 64, check "NUMEXPR_MAX_THREADS" environment variable.
INFO:numexpr.utils:Note: NumExpr detected 72 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
INFO:numexpr.utils:NumExpr defaulting to 8 threads.
WARNING:pymbar.timeseries:Warning on use of the timeseries module: If the inherent timescales of the system are long compared to those being analyzed, this statistical inefficiency may be an underestimate. The estimate presumes the use of many statistically independent samples. Tests should be performed to assess whether this condition is satisfied. Be cautious in the interpretation of the data.
INFO:pymbar.mbar_solvers:JAX detected. Using JAX acceleration.
/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/Sire/init.py:278: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
ld = _pf.linux_distribution()
INFO:root:Downloading ligand files from the Protein Data Bank...
INFO:root:Running OpenBabel...
INFO:root:Running obminimize...
INFO:root:Running OpenBabel...
INFO:root:Running obminimize...
/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/Bio/Seq.py:1756: BiopythonDeprecationWarning: myseq.tomutable() is deprecated; please use MutableSeq(myseq) instead.
BiopythonDeprecationWarning,
INFO:root:Running PDB2PQR...
INFO:root:Running OpenBabel...
INFO:root:Parametrising original crystal system...
INFO:root:Running tleap...
INFO:root:Running tleap...
INFO:root:Running tleap...
INFO:root:Parametrising ligand benzol...
WARNING:root:Cannot parametrise unprotonated ligand. Protonating first with default parameters...
INFO:root:Running OpenBabel...
INFO:root:Running OpenBabel...
INFO:root:Running antechamber...
INFO:root:Running parmchk2...
INFO:root:Running tleap...
INFO:root:Parametrising ligand o-xylene...
WARNING:root:Cannot parametrise unprotonated ligand. Protonating first with default parameters...
INFO:root:Running OpenBabel...
INFO:root:Running OpenBabel...
INFO:root:Running antechamber...
INFO:root:Running parmchk2...
INFO:root:Running tleap...
INFO:root:Creating morph benzol~o-xylene...
/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Wrappers/rdkitwrapper.py:1468: DeprecationWarning: The rdkit.Chem.MCS module is deprecated; please use rdkit.Chem.rdFMCS instead.
mcs_string = _MCS.FindMCS(*args, **kwargs).smarts
/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Wrappers/rdkitwrapper.py:1468: DeprecationWarning: The rdkit.Chem.MCS module is deprecated; please use rdkit.Chem.rdFMCS instead.
mcs_string = _MCS.FindMCS(*args, **kwargs).smarts
INFO:root:Solvating...
Traceback (most recent call last):
File "T4-lysozyme.py", line 34, in
system.prepareComplexes()
File "/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Ensemble/init.py", line 240, in prepareComplexes
centre=self.centre, work_dir=curdir.path, filebase="complex")]
File "/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/Solvate/init.py", line 84, in solvate
files = _PC.IO.GROMACS.saveAsGromacs(filebase, complex)
File "/home/chaoyang/miniconda3/envs/protocaller/lib/python3.7/site-packages/ProtoCaller/IO/GROMACS.py", line 33, in saveAsGromacs
_pmd.load_file(filebase + ".gro87").save(filebase + ".gro", combine="all")
File "/home/chaoyang/soft/amber22/lib/python3.9/site-packages/parmed/formats/registry.py", line 168, in load_file
raise FileNotFoundError('%s does not exist' % filename)
FileNotFoundError: complex.gro87 does not exist

tleap failed for protein

Hi, here is code to reproduce:

protein = Protein('6VTN', ligand_ref='1001')
protein.filter(ligands=None, waters='chain', simple_anions=None,
                      complex_anions=None,
                      chains=['A'])
protein.prepare()
protein.parametrise()

Error:

OSError: Error while calling command 'tleap'

tleap.log

FATAL:  Atom .R<CHIE 375>.A<HD1 19> does not have a type.

Molecule ID not found

Hi, I used the following code:

protein = Protein('4NA9', ligand_ref='301')

which raised an error:

ValueError: Molecule ID not found: 301

I've confirmed that molecule 301 is in the pdb file.

Explicit valence for atom # 37 C greater than permitted

Hi, I'm parametrising CHEMBL3127463 by ProtoCaller with the following code:

lig = Ligand('CC(C)CC(=O)Nc1cc(-c2ccc(C(N)=O)cc2C(=O)O)cc(C2CC(C)(c3ccccc3)c3cc(C(=N)N)ccc3N2)c1', protonated=False, minimise=True)
lig.protonate()
lig.parametrise()

which threw an error:

  File "/data/FEP/prepare/ProtoCaller/Ensemble/Ligand.py", line 183, in protonate
    molecule = _rdkit.AssignBondOrdersFromTemplate(self.molecule, molecule, assign_charge=False)
  File "/data/FEP/prepare/ProtoCaller/Wrappers/rdkitwrapper.py", line 296, in AssignBondOrdersFromTemplate
    _Chem.SanitizeMol(mol)
rdkit.Chem.rdchem.AtomValenceException: Explicit valence for atom # 37 C greater than permitte

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.