[gmx-developers] xlate_atomname_gmx2pdb in pdbio.c

Jian Zou jianzou at gmail.com
Mon Oct 27 20:56:55 CET 2008


Hi,

The following piece of code is taken from the definition of
"xlate_atomname_gmx2pdb" in gmx4/src/gmxlib/pdbio.c (the previous
"gromacs_name" in gmx3).
length=strlen(name);
if (length>3 && isdigit(name[length-1])) {
	temp=name[length-1];
	for(i=length-1; i>0; --i)
		name[i]=name[i-1];
	name[0]=temp;
}

This will change the atom name like H5'1 in ffamber to 1H5' for PDB
output. The corresponding xlate_atomname_pdb2gmx will change it back
when you output a GRO.

Why shall we do this conversion? Is it for some special purpose?


Regards,

Jian



More information about the gromacs.org_gmx-developers mailing list