Giter VIP home page Giter VIP logo

Comments (10)

alchemistcai avatar alchemistcai commented on May 28, 2024 1
  1. If you rename HIS to HID manually,do it after Reduce removing and adding Hs,not before.
  2. Reduce will generate HID and HIE both but won't change atom name.Renaming HIS to HID and using Reduce will cause wrong protonation.

his

  1. I have a solution:if you have installed GROMACS,use pdb2pqr30 --ff=AMBER --ffout=AMBER --with-ph=7.4 github_protein.pdb gpamber.pqr,and export it to pdb by Pymol.It will generate correct atom type.
  2. Are there other more elegant solutions?Ambertools?I haven't figure it out.Maybe some PDB tools are more friendly on Amber FFs.
  3. This pdb file may be used for the simulation directly.Try to run with it.Good luck.
    github_pdb_pqr.zip

from lightdock.

alchemistcai avatar alchemistcai commented on May 28, 2024

Upload your structure.pdb may help us know what's wrong.

from lightdock.

brianjimenez avatar brianjimenez commented on May 28, 2024

Hi @mhyleung ,
You may need to rename HIS to HID in the protein partner. Then, you can follow these steps:

reduce -Trim prot.pdb > prot_no_h.pdb;
reduce -BUILD prot_no_h.pdb > prot_h.pdb;

reduce -Trim dna.pdb > dna_no_h.pdb;
reduce -BUILD dna_no_h.pdb > dna_h.pdb;
python reduce_to_amber.py dna_h.pdb fixed_dna_h.pdb;

You can use this more updated version of the reduce_to_amber.py script:

#!/usr/bin/env python3

import os
import argparse
from lightdock.scoring.dna.data.amber import atoms_per_residue
from lightdock.pdbutil.PDBIO import read_atom_line


def _format_atom_name(atom_name):
    """Format ATOM name with correct padding"""
    if len(atom_name) == 4:
        return atom_name
    else:
        return " %s" % atom_name


def write_atom_line(atom, output):
    """Writes a PDB file format line to output."""
    if atom.__class__.__name__ == "HetAtom":
        atom_type = "HETATM"
    else:
        atom_type = "ATOM  "
    line = "%6s%5d %-4s%-1s%3s%2s%4d%1s   %8.3f%8.3f%8.3f%6.2f%6.2f%12s\n" % (
        atom_type,
        atom.number,
        _format_atom_name(atom.name),
        atom.alternative,
        atom.residue_name,
        atom.chain_id,
        atom.residue_number,
        atom.residue_insertion,
        atom.x,
        atom.y,
        atom.z,
        atom.occupancy,
        atom.b_factor,
        atom.element,
    )
    output.write(line)


translation = {"H5'":"H5'1", "H5''":"H5'2", "H2'":"H2'1", "H2''":"H2'2", "OP1":"O1P", "OP2":"O2P"}


if __name__ == "__main__":

    parser = argparse.ArgumentParser()
    parser.add_argument("input_pdb_file")
    parser.add_argument("output_pdb_file")
    args = parser.parse_args()

    with open(args.input_pdb_file) as ih:
        with open(args.output_pdb_file, 'w') as oh:
            for line in ih:
                line = line.rstrip(os.linesep)
                if line.startswith("ATOM  "):
                    atom = read_atom_line(line)
                    if atom.residue_name not in atoms_per_residue:
                        print(f"[Warning] Not supported atom: {atom.residue_name}.{atom.name}")
                    else:
                        if atom.name not in atoms_per_residue[atom.residue_name]:
                            try:
                                atom.name = translation[atom.name]
                                write_atom_line(atom, oh)
                            except KeyError:
                                print(f"[Warning] Atom not found in mapping: {atom.residue_name}.{atom.name}")
                        else:
                            write_atom_line(atom, oh)

If after this "protocol" you're still having issues with some atom types, it might be the capping at the C or N-terminal. Try to remove those hydrogens, remove all LightDock generated files in that directory and try again.

Let us know if this fixes your issues, otherwise you may follow @alchemistcai comment and share the structure (if possible).

from lightdock.

mhyleung avatar mhyleung commented on May 28, 2024

Thank you for the rapid response. Neither the new script nor changing the HIS residues to HID helped. The error now simply is

[lightdock] ERROR: [NotSupportedInScoringError] Residue A.HID.282 or atom HE2 not supported. DNA scoring only supports AMBER94 types.

I have tried it also on another protein/DNA match constructed based on a similar fashion, run the new script and tried. The same HIS error occurred. This time, I noticed that when I change the HIS to HID, the reduce -BUILD step gives me this in the middle of the output:

*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
SKIPPED H( A 325 ARGHH21 ): A 325 ARG NH2  bonds- A 329 MET SD   (H bumps)
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.
*WARNING*: Res "HID" not in HETATM Connection Database. Hydrogens not added.

In any case, I have uploaded this other publicly available protein/DNA match here. Thank you very much
github_pdb.zip

Marc

from lightdock.

alchemistcai avatar alchemistcai commented on May 28, 2024

Preparing PDB files with pdb4amber.

A much easier way to work with amberFF's PDB files.Powered by Ambertools.

pdb4amber --reduce github_protein.pdb >gpambertools.pdb will help.

Ambertools must use --reduce flag to add hydrogens first to change correct atom names.

Ambertool's output has very different protonation from gromacs.Like this:

gpambertools.zip

I'm not sure which one works better on protonation,Gromacs or Reduce.

from lightdock.

JorgeRoel avatar JorgeRoel commented on May 28, 2024

Thanks @alchemistcai. Let's be patient ๐Ÿ‘ผ

from lightdock.

mhyleung avatar mhyleung commented on May 28, 2024

Thank you very much!

I tried Ambertools as mentioned above, the --reduce option gave me an REDUCE returned non-zero exit status: See reduce_info.log for more details error. Let me try gromacs also and see what I get.

from lightdock.

mhyleung avatar mhyleung commented on May 28, 2024

Dear both

I got pdb2pqr set up, but just to test I used the file kindly prepared by @alchemistcai above. I just want to make sure that I do not need to run reduce again for that "fixed" pdb file, and instead use that file directly for the lightdock3_setup.py command right? Thanks

Marc

from lightdock.

brianjimenez avatar brianjimenez commented on May 28, 2024

Hi @mhyleung , those files prepared by @alchemistcai should work. Please also note than the dna.pdb file is using HETATM instead of ATOM in your provided files. Please rename those entries before running reduce_to_amber.py or lightdock3_setup.py. Moreover, if the protein or the dna partners have missing backbone atoms, please rebuild them or just remove those nucleotides or residues before running LightDock if you enable ANM. Otherwise normal modes calculation will fail.

from lightdock.

brianjimenez avatar brianjimenez commented on May 28, 2024

After several iterations, I note down here a couple of important points:

  • reduce_to_amber.py only processes ATOM entries and not HETATM in PDB files. Since ATOM is reserved for standard residues or nucleotides, this should be the expected behavior.
  • It is important to deal with missing atoms in backbone structure, specially when enabling flexibility through ANM.
  • reduce command and many other software for managing protonation may add capping hydrogens and other atoms, which could be not supported by default in the specific scoring function used in LightDock at the time. Simply remove them if you encounter issues at the setup or simulations steps (if in the simulation, remove them from the PDB files, clean all generated files by LightDock during setup and run again setup script).
  • Empty chains are not supported by LightDock, indeed, empty chains might be a bad practice when dealing with PDB information.

I close down for the moment this issue, please feel free to reopen it if there are more questions or issues related to the topic.

from lightdock.

Related Issues (20)

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.