Closed stefdoerr closed 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
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
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
.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!