You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue writePDB with saving 4 letter residues for the probes in druggability simulations. I am using the long_resname feature in parsePDB to select the probes which all have four letter residue name. When I am trying to save the a probe "ACET" for example the corresponding pdb file truncates the residue to ACE in the pdb file.
Best,
Carlos
from prody import *
test = parsePDB('newcgenff.pdb', long_resname = True)
probes = ['IPAM', 'PRO2', 'ACET', 'IBUT', 'ACEM', 'IMIA', 'BENZ']
probe_selstr = 'noh and resname'
prefix = 'dg'
for p in probes:
sel = test.select('noh and resname ' + p)
print(p)
if sel is None:
continue
#raise ValueError('probe ' + p + ' is not found in the system')
hv = sel.getHierView()
n = hv.numResidues()
res = next(hv.iterResidues())
writePDB(prefix + '_' + p + '.pdb', res, warned_long_resname = True)
plog(str(n) + ' copies of ' + p + ' is found.')
probe_selstr += ' ' + p
print(probe_selstr)
REMARK ACET 674
ATOM 1 C1 ACE X 674 -51.279 -38.133 -8.576 0.00 0.00 PROB C
ATOM 2 C2 ACE X 674 -51.282 -36.660 -8.181 0.00 0.00 PROB C
ATOM 3 O1 ACE X 674 -50.157 -36.309 -7.208 0.00 0.00 PROB O
ATOM 4 O2 ACE X 674 -51.105 -35.890 -9.354 0.00 0.00 PROB O
END
The text was updated successfully, but these errors were encountered:
if len(resnames[i]) > 3:
resname = resname[:3]
if not warned_long_resname:
LOGGER.warn('Resname {0} too long, cutting resname to 3 characters as {1}'.format(
resnames[i], resname
))
warned_long_resname = True
If I change resname[:3] to resname[:4] the corresponding pdb file is now has the residue name ACET instead of ACE.
REMARK ACET 674
ATOM 1 C1 ACET X 674 -51.279 -38.133 -8.576 0.00 0.00 PROB C
ATOM 2 C2 ACET X 674 -51.282 -36.660 -8.181 0.00 0.00 PROB C
ATOM 3 O1 ACET X 674 -50.157 -36.309 -7.208 0.00 0.00 PROB O
ATOM 4 O2 ACET X 674 -51.105 -35.890 -9.354 0.00 0.00 PROB O
END
Hi,
I am having an issue writePDB with saving 4 letter residues for the probes in druggability simulations. I am using the long_resname feature in parsePDB to select the probes which all have four letter residue name. When I am trying to save the a probe "ACET" for example the corresponding pdb file truncates the residue to ACE in the pdb file.
Best,
Carlos
The text was updated successfully, but these errors were encountered: