Comments (3)
Clear the tmpfiles generated by lightdock3_setup.py
and try this conversion for AMBER94 atom type compatibility by conda and Ambertools:
conda install -c conda-forge ambertools
pdb4amber --reduce xxx.pdb > xxx.amber.pdb
Then use lightdock3_setup.py
again.
See also #45 ,a similar problem.
from lightdock.
Hi @MarielEsquivel98 , thanks for using LightDock.
First, we have never tested DNA-DNA docking, we are curious about this case scenario, but not sure if the dna
scoring function will handle properly DNA-DNA since it was designed specifically for protein-DNA.
Concerning the issue with atom types, @alchemistcai pointed out a few different approaches. Another workaround would be to prepare structures as stated in the tutorial with reduce
and then applying the reduce_to_amber.py
script:
reduce -Trim dna.pdb > dna_noh.pdb
reduce -BUILD dna_noh.pdb > dna_h.pdb
reduce_to_amber.py
:
#!/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)
def translate_rna(residue_name):
if residue_name in ['U', 'G', 'A', 'C']:
residue_name = f'R{residue_name}'
return residue_name
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)
atom.residue_name = translate_rna(atom.residue_name)
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)
python3 reduce_to_amber.py dna_h.pdb > dna_fixed.pdb
Maybe it would be a good idea also to test the system on the LightDock server, many fixes will be performed automatically for you: https://server.lightdock.org/
from lightdock.
Closing issue since there is no feedback. Please feel free to reopen if needed.
from lightdock.
Related Issues (20)
- Tutorials for lightdock 0.9.3 is needed. HOT 2
- PDB parser fails when two residues with same name but different insertion code
- error: run lightdock3_setup.py DDB1-CRBN.pdb brd4.pdb --noxt --noh --now -anm HOT 1
- lightdock online: how to fill Active Residue Restraints? any example? HOT 1
- [lgd_cluster_bsas] ERROR: object of type 'PosixPath' has no len()? HOT 6
- what the datas meaning of cluster.repr file? HOT 4
- Unexpected keyword argument 'seed' HOT 6
- dna.pdb file empty after running `reduce_to_amber.py` and subsequent error during simulation HOT 10
- lightdock pdb file visualises incorrectly in pymol HOT 5
- ERROR: [NormalModesCalculationError] Number of atoms is different HOT 6
- Swarm number remains 400 after using residue restraints HOT 5
- Can't find implicit membrane model for PBP2a protein on Memdock. HOT 6
- Issues when docking HOT 1
- test_dna and test_pydock failed. HOT 2
- TOBI scoring function fails to replicate results with CCharPPI server HOT 5
- Migrate tests from nose to pytest HOT 2
- Question about the treatment of protein-ligand docking. HOT 3
- Freezes after a while HOT 6
- Support for non standard amino acids HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightdock.