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 realised that when I use GROMACS tools (editconf or trjconv) to convert a gro to a pdb, some atom names with 4 letters get changed: for example on the first POPC in the file described in issue #1C310 becomes 0C31, H101 becomes 1H10. I think that could be a problem for generating some mapping or .def files. Here is a quick script (named fix_atom_name_4letters.py) I wrote to fix this:
import sys
if len(sys.argv) != 2:
exit("Usage: python ./fix_atom_name_4letters.py 1POPC.pdb")
with open(sys.argv[1]) as f:
for line in f:
atname = line[12:16].strip()
if len(atname) == 4:
if atname[0] not in "HCPN":
right_atname = atname[1:] + atname[0]
print(line.replace(atname, right_atname), end="")
else:
print(line, end="")
else:
print(line, end="")
The text was updated successfully, but these errors were encountered:
patrickfuchs
changed the title
PDB atom names with 4 letters generated by GROMACS tools
Problems with PDB atom names with 4 letters generated by GROMACS tools
May 15, 2020
Uh oh!
There was an error while loading. Please reload this page.
I realised that when I use GROMACS tools (editconf or trjconv) to convert a gro to a pdb, some atom names with 4 letters get changed: for example on the first POPC in the file described in issue #1
C310
becomes0C31
,H101
becomes1H10
. I think that could be a problem for generating some mapping or .def files. Here is a quick script (namedfix_atom_name_4letters.py
) I wrote to fix this:Then one can launch it like this:
The text was updated successfully, but these errors were encountered: