[gmx-users] atomname -> atomic number

Mark Abraham mark.abraham at anu.edu.au
Thu May 15 11:39:46 CEST 2008


> Mark Abraham wrote:
>> Daniel Baum wrote:
>>> Hi,
>>>
>>> I would like to write a reader for *.gro files, but I couldn't find any
>>> information about how to map the atomname to the atomic number. Can
>>> anyone shed some light on this problem? I would be most grateful.
>>
>> It's an ill-defined problem... is "HG" mercury or some kind of
>> hydrogen? "CD" a delta-carbon or cadmium?
> Right, but I'd like to know.  Is it really like this?  Can exactly the
> same atomname really have different meanings?  That's bizarre.  There
> should be some rule, shouldn't there.

There exists no rule that allows a 1-to-1 mapping of all possible atom
types to all possible 4-letter(?) atom names in such a way that a human
can readily remember the mapping. Thus whatever rule you do use has a
shortcoming.

>> It's better-defined if you can assume some kind of convention about
>> atom naming, e.g. the PDB one, or the NMR one, etc.
> I know that PDB is well-defined, but this doesn't help because I want to
> read .gro files.

I didn't say to use a PDB file... I said life is easier if you can assume
the PDB *naming convention*.

However, you might just as easily use editconf as a filter to convert .gro
to .pdb and feed that to your visualization program, if the
atom-name-to-atomic-number mapping already works there.

>> It's much easier to avoid re-inventing the wheel. People may have some
>> suggestions if you let us know why you want to write a .gro reader
>> that needs to assign atomic numbers.
> I don't want to re-invent the wheel.  I simply have some .gro files and
> I want to know the element type in order to display the atoms correctly
> according to their element type/atomic number.

VMD and ngmx both do this already...

Mark







More information about the gromacs.org_gmx-users mailing list