Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various PDB fixes #87

Merged
merged 16 commits into from
Feb 7, 2023
Merged

Various PDB fixes #87

merged 16 commits into from
Feb 7, 2023

Conversation

IAlibay
Copy link
Collaborator

@IAlibay IAlibay commented Jan 10, 2023

Fixes #68

TODO:

  • Make sure HETATM are applied properly, and make sure Fix protein.pdb files; remove GROMACS-specific files; drop LFS usage #52 (comment) is fixed.
  • Change the atom names for the caps to adhere to PDB naming conventions
  • Remove ANISOU records for TYK2 and Thrombin
  • Rename NMA caps to NME
  • Don't have NME (or NMA) caps have icodes
  • Rename first residue backbone hydrogen to correct naming scheme
  • Make sure SSBOND entries are consistent - CONECT records for thrombin are there and it's all consistent with pdb4amber
  • Fix pfkfb3 connection record
  • Remove CONECT records for caps
  • Work out what to do with TPO in cdk2 - double check CCD entry
  • TNSK2, and PDE2 with bonded zinc and PDE2 with bonded magnesium?
    • Shift to LINKS

@IAlibay
Copy link
Collaborator Author

IAlibay commented Jan 10, 2023

Note:

This doesn't necessarily fix things for AMBER, there are two cases where I expect failures with leap.

  • Missing CYX residues in Thrombin: reasonably easily fixed with a pre-processing script like pdb4amber
  • Incorrectly named protonated residues (e.g. HIP, HID, etc...): could be fixed by a template matching approach?

From a quick test at leap those seem to be the only issues for getting this working in AMBER.

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #87 (4fef270) into main (e9b153e) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

@dotsdl
Copy link
Member

dotsdl commented Jan 10, 2023

@IAlibay will remove CONECT records for now; may re-add in 0.4.0

@IAlibay IAlibay changed the title [WIP] Various PDB fixes Various PDB fixes Jan 17, 2023
@dotsdl
Copy link
Member

dotsdl commented Jan 17, 2023

For structural ions, let's use LINKS entries to indicate their coordination.

@dotsdl dotsdl requested a review from jchodera January 17, 2023 17:29
Copy link
Member

@jchodera jchodera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me!

I've confirmed the protein PDB files can all be read in OpenMM:

from openmm.app import PDBFile

from glob import glob
filenames = glob('data/*/01_*/crd/*.pdb')
print(filenames)

# Define the keyword arguments to feed to ForceField
from openmm import unit
from openmm import app
forcefield_kwargs = { 'constraints' : app.HBonds, 'rigidWater' : True, 'removeCMMotion' : False, 'hydrogenMass' : 4*unit.amu }
# Initialize a SystemGenerator using GAFF
from openmmforcefields.generators import SystemGenerator
system_generator = SystemGenerator(forcefields=['amber/ff14SB.xml', 'amber/phosaa14SB.xml', 'amber/tip3p_standard.xml'], small_molecule_forcefield='gaff-2.11', forcefield_kwargs=forcefield_kwargs, cache='db.json')

for filename in filenames:
    print(filename)
    pdbfile = app.PDBFile(filename)
    openmm_topology = pdbfile.topology
    # Create an OpenMM System from an OpenMM Topology object
    system = system_generator.create_system(openmm_topology)

@IAlibay
Copy link
Collaborator Author

IAlibay commented Feb 7, 2023

Thanks for the review @jchodera !

@IAlibay IAlibay merged commit d338760 into main Feb 7, 2023
@IAlibay IAlibay deleted the pdb_fixing_v1 branch February 7, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Fix PDB files
3 participants