[MMTK] Strategies for GAFF support into MMTK-2.5.18

Konrad Hinsen hinsen at cnrs-orleans.fr
Thu Apr 12 10:32:40 UTC 2007

On Apr 11, 2007, at 17:27, Mark Williamson wrote:

> I've been trying to "incorporate" GAFF
> (http://dx.doi.org/10.1002/jcc.20035) support into the MMTK-2.5.18

That would be nice to have indeed!

> I've also deposited the gaff.dat forcefile file in that directory.  
> Now,
> I've hit an interesting problem due to GAFF's dependence of lower case
> for atom types. As a matter of internal consistency, _normalizeName
> coverts all the atoms types to upper case when AmberData.py parses in
> the relevant data file for that particular AMBER force field.

I don't remember why I decided to convert all atom types to upper  
case. It doesn't seem to be necessary for internal consistency. A  
quick test shows that my energy-related scripts work fine without  
that conversion. I'd be happy to disable the conversion in the  
development release - and see if that causes any trouble to anyone.

A workaround that shouldn't interfere with the other Amber type force  
fields is to change the normalization routine temporarily for readGAFF:

def casePreservingReadGAFF(main_file = None, mod_files = None):
     backup = AmberData._normalizeName
         AmberData._normalizeName = lambda s: s.strip()
         params = readGAFF(main_file, mod_files)
         AmberData._normalizeName = backup
         return params
         AmberData._normalizeName = backup

That still qualifies as a hack, but at least it works :-)

In the long run, MMTK should behave exactly like AMBER as far as  
reading parameter files is concerned. If AMBER is not case sensitive,  
then MMTK should not be either, so my preferred solution is to remove  
the conversion to upper case atom types.

Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen at cnrs-orleans.fr

More information about the mmtk mailing list