[gmx-users] About "Invalid order for directive atomtypes" error
Hans Martin Senn
senn at chem.gla.ac.uk
Wed Jul 16 19:06:20 CEST 2008
Hi Justin
On 16 Jul 2008, at 17:50, Justin A. Lemkul wrote:
> Hans Martin Senn wrote:
>> Hi Xavier
>> On 16 Jul 2008, at 15:51, Xavier Periole wrote:
>>> On Wed, 16 Jul 2008 15:04:17 +0100
>>> Hans Martin Senn <senn at chem.gla.ac.uk> wrote:
>>>> Dear all
>>>> This is a topic that has come up a couple of times here, see,
>>>> e.g., http://www.gromacs.org/pipermail/gmx-users/2008-January/032114.html
>>>> .
>>>> However, despite the recommendations given in that previous post,
>>>> I think the problem is exactly that the information in the
>>>> manual is not sufficiently accurate or clear in this case.
>>>> Specifically: I have a protein with two bound ligands, ZTRP and
>>>> FAD.
>>>> - For the protein I use ffamber03. pdb2gmx created two itp files
>>>> for the two chains.
>>>> - For ZTRP, I have built an itp file using AMBER atom types (as
>>>> defined in ffamber03.atp or ffamber03nb.itp).
>>>> - For FAD, I have an itp file generated using antechamber and
>>>> amb2gmx. It contains an [ atomtypes ] section defining the GAFF
>>>> atom types.
>>>> This was my first go at assembling it all in the top file:
>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>> ; Include forcefield parameters
>>>> #include "ffamber03.itp"
>>>> ; Include chain topologies
>>>> #include "topol_A.itp"
>>>> #include "topol_B.itp"
>>>> #include "topol_FAD.itp"
>>>> #include "topol_ZTRP.itp"
>>>> ; Include water topology
>>>> #include "ffamber_tip3p.itp"
>>>> ; Include generic topology for ions
>>>> #include "ions.itp"
>>>> [ system ]
>>>> ; Name
>>>> Full system in water
>>>> [ molecules ]
>>>> ; Compound #mols
>>>> Protein_A 1
>>>> Protein_B 1
>>>> ZTRP 1
>>>> FAD 1
>>>> SOL 20893
>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>> However, grompp complained about "Invalid order for directive
>>>> atomtypes" when including topol_FAD.itp.
>>> It might be that the same protein name is in two of your different
>>> topology files.
>>> The problem is certainly somewhere in those topologies.
>> By "protein name", do you mean the [ moleculetype ] section? If so,
>> the answer is no. Each of the molecule itp files specifies exactly
>> one molecule type (protein chain or ligand); the names are unique.
>> Of course it is fair to say that the problem is in the topologies,
>> as demonstrated by my solution to the problem... The point is that
>> it is apparently not permitted to have [ atomtypes ] (in
>> topol_FAD.itp) after having read other molecule definitions (in
>> topol_{A,B}.itp), in contrast to what I think the manual suggests.
>
> Just thinking out loud, and this may or may not do anything, but I
> know that a lot of problems encountered involving topologies result
> from having things in the wrong order. For example, you've included
> the FAD.itp before ZTRP.itp, but then called ZTRP before FAD in the
> [ molecules ] section. I know things in the [ molecules ] section
> need to line up with what's in the .gro/.pdb file, but I don't know
> about for certain about order within the topology. I once included
> a ligand topology after the water #include statement by mistake, and
> got a different error, but fixing the order solved everything.
>
> Try switching the respective molecule definition or .itp call to
> correspond to whatever is in your structure file, and see if that
> does anything.
It does not (I should have said that I tried that). As you point out,
the order in which the components are listed in the [ molecules ]
section DOES matter. However, it seems that the corresponding itp
files can be included in a different (arbitrary?) order.
Cheers
Hans
> Again, this may or may not be worth anything, but it's something I'd
> try if all else leaves me scratching my head :-)
>
> -Justin
>>>> Following a hint from the mailing list, I took the [ atomtypes ]
>>>> section out of topol_FAD.itp and put it into a separate itp file
>>>> "GAFF- types.itp", which is included before the other molecule
>>>> itp files. The final top file then looked like this:
>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>> ; Include forcefield parameters
>>>> #include "ffamber03.itp"
>>>> ; Define GAFF atomtypes here (not in molecule itp file) to avoid
>>>> 'Invalid order' error
>>>> #include "GAFF-types.itp"
>>>> ; Include chain topologies
>>>> #include "topol_A.itp"
>>>> #include "topol_B.itp"
>>>> #include "topol_FAD.itp"
>>>> #include "topol_ZTRP.itp"
>>>> ; Include water topology
>>>> #include "ffamber_tip3p.itp"
>>>> ; Include generic topology for ions
>>>> #include "ions.itp"
>>>> [ system ]
>>>> ; Name
>>>> Full system in water
>>>> [ molecules ]
>>>> ; Compound #mols
>>>> Protein_A 1
>>>> Protein_B 1
>>>> ZTRP 1
>>>> FAD 1
>>>> SOL 20893
>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>> This solved the problem. However, and this is my main point here,
>>>> the manual for GROMACS 3.3, p. 98 says:
>>>> "starting with GROMACS version 3.1.3 all directives at the
>>>> parameter level can be used multiple times and there are no
>>>> restrictions on the order..."
>>>> In my reading, this means that [ atomtypes ] can be defined
>>>> anywhere (as long as it is before they are referred to for the
>>>> first time), which is clearly at variance with the observed
>>>> behaviour. Am I misinterpreting it, or is the manual not precise
>>>> enough here?
>>>> A final note: Since simulating a protein with bound ligands is
>>>> an extremely common case and since this issue about "Invalid
>>>> order" seems to come up regularly, it would be very helpful if a
>>>> corresponding HOWTO was available in the manual/FAQ/wiki to
>>>> settle it once and for all.
>>>> Best wishes
>>>> Hans
.......................................................
Dr. Hans Martin Senn
Lord Kelvin/Adam Smith Research Fellow
E-mail: senn at chem.gla.ac.uk
Direct line: +44 (0)141 330 6574
Fax: +44 (0)141 330 4888
Department of Chemistry
Joseph Black Building
University of Glasgow
Glasgow G12 8QQ
Scotland, UK
More information about the gromacs.org_gmx-users
mailing list