openmm / pdbfixer

PDBFixer fixes problems in PDB files
Other
462 stars 115 forks source link

After fixing my protein giving long tail #213

Closed Bio-Otto closed 3 years ago

Bio-Otto commented 3 years ago

I have fixed the structure named "2h6o" downloaded from the protein databank with the script given below with pdbfixer. But there was a long tail in the fixed structure (see the picture below). Putting this structure in a water box prolongs the MD calculation time (because of the box dimensions). What can I do? @peastman

In the picture below, the raw and fixed structures are aligned.

image

def fix_pdb(pdb_id):
    path = os.getcwd()
    if len(pdb_id) != 4:
        print("Creating PDBFixer...")
        fixer = PDBFixer(pdb_id)
        print("Finding missing residues...")
        fixer.findMissingResidues()
        print("Finding nonstandard residues...")
        fixer.findNonstandardResidues()
        print("Replacing nonstandard residues...")
        fixer.replaceNonstandardResidues()
        print("Removing heterogens...")
        fixer.removeHeterogens(keepWater=True)

        print("Finding missing atoms...")
        fixer.findMissingAtoms()
        print("Adding missing atoms...")
        fixer.addMissingAtoms()
        print("Adding missing hydrogens...")
        fixer.addMissingHydrogens(7)
        print("Writing PDB file...")

        PDBFile.writeFile(
            fixer.topology,
            fixer.positions,
            open(os.path.join(path, "%s_fixed_pH_%s.pdb" % (pdb_id.split('.')[0], 7)),
                 "w"),
            keepIds=True)
        return "%s_fixed_pH_%s.pdb" % (pdb_id.split('.')[0], 7)
Bio-Otto commented 3 years ago

@peastman I also owe you a special thank you. You are producing solutions to our problems very actively. Thank you so much for your precious time.

peastman commented 3 years ago

The manual contains an example of how to add missing residues only in the middle of chains, not at the ends:

https://github.com/openmm/pdbfixer/blob/b66bb54c0c53011470797e497bb91ac3cff5288c/Manual.html#L253-L263

Bio-Otto commented 3 years ago

@peastman thank you so much for clarifying.