Electrostatics / pdb2pqr

PDB2PQR - determining titration states, adding missing atoms, and assigning charges/radii to biomolecules.
http://www.poissonboltzmann.org/
Other
122 stars 34 forks source link

Extending PARSE and AMBER FF for non-standard amino-acids #243

Closed stefdoerr closed 2 years ago

stefdoerr commented 2 years ago

Hi, I am working on extending the forcefields in pdb2pqr for non-standard amino-acids. I read my structure in with PARSE and output AMBER naming. I am not using pdb2pqr for creating PQR files, I just want to protonate and optimize my protein and standardize the atom names.

For example this protein contains a TYS amino-acid.

For now I've managed to roughly create the XML and DAT files for it (excluding charge/radius) TYS.zip which I will merge into AA.xml and PARSE.dat, however I have some questions

  1. Do I need charges/radii for pdb2pqr to protonate my structures? Or are those necessary just for generating PQR files (which I don't need)?
  2. If I do need them, where can I obtain the radii / charges from? Could I just take them from GAFF2 / AM1-BCC, would that work for PARSE?
  3. I want my output FF to be AMBER, however since I am creating these residues myself I could use the same naming scheme for PARSE+AMBER. In that case do I still need to modify AMBER.DAT/names or would pdb2pqr keep the residue unmodified if it cannot find it in the AMBER ff?
  4. Do I need anything in the .name files? As far as I can tell if I use the same naming scheme in PARSE and AMBER it should not be necessary?

Thanks in advance!

stefdoerr commented 2 years ago

On my first attempt I got the following error:

~/Work/pdb2pqr/pdb2pqr/biomolecule.py in create_residue(self, residue, resname)
    970                     klass = getattr(aa, resname)
    971                 except AttributeError:
--> 972                     klass = getattr(na, resname)
    973                 residue = klass(residue, refobj)
    974         except (KeyError, NameError):

AttributeError: module 'pdb2pqr.na' has no attribute 'TYS'

Does that mean I'd need to add a new class to aa.py for each AA I am adding to the forcefield? That makes it a bit hard to extend, unless I find some way of dynamically adding classes to the pdb2pqr.aa module?

Just to test, I added it like this and it worked

class TYS(Amino):
    """TYS class."""

    def __init__(self, atoms, ref):
        Amino.__init__(self, atoms, ref)
        self.reference = ref

    def letter_code(self):
        return "X"

Seems to protonate the residue fine, here you can see TYS together with the previous residue 362 image

sobolevnrm commented 2 years ago

You are correct; you current have to add a new TYS class to make this work. We're trying to refactor the code to use CIF containers as the base object which should make this easier. However, that work is ongoing and we don't have an ETA right now. @intendo