[gmx-developers] xlate_atomname_gmx2pdb in pdbio.c

David van der Spoel spoel at xray.bmc.uu.se
Mon Oct 27 21:17:42 CET 2008


Jian Zou wrote:
> 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?
To adhere to the pdb standard. You can not have characters in the left 
most column, since they will be interpreted as elements. For instance 
HG11 (leucine side chain) would turn this atom into a Mercury atom. If 
you rename it as 1HG1, it is clear.

Of course your example is different. I am not sure there is a perfect 
solution though.
> 
> 
> Regards,
> 
> Jian
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.


-- 
David van der Spoel, Ph.D., Professor of Biology
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se



More information about the gromacs.org_gmx-developers mailing list