[gmx-users] Invalid order for directive defaults

Justin Lemkul jalemkul at vt.edu
Tue Nov 12 16:31:49 CET 2013



On 11/12/13 10:07 AM, Atila Petrosian wrote:
> Dear all
>
> My system contains protein + cnt + water molecules.
>
> I have summarized what I did below:
> -----------------------------------------------------------------------------------
>
> 1) By pdb2gmx and charmm27 force field, I obtained pr.top for protein then
> I converted it into pr.itp by deleting
>
> ; Include forcefield parameters
> #include "charmm27.ff/forcefield.itp"
>
> from begining of file and by deleting
>
> ; Include water topology
> #include "charmm27.ff/tip3p.itp"
>
> #ifdef POSRES_WATER
> ; Position restraint for each water oxygen
> [ position_restraints ]
> ;  i funct       fcx        fcy        fcz
>     1    1       1000       1000       1000
> #endif
>
> ; Include topology for ions
> #include "charmm27.ff/ions.itp"
>
> [ system ]
> ; Name
> Protein
>
> [ molecules ]
> ; Compound        #mols
> Protein_chain_A     1
>
> from ending of file.
> ------------------------------------------------------------------------------------
>
> 2) I used bonded and nonbonded parameters for cnt from paper:
>   J. Phys. Chem. B 2001, 105, 9980-9987
> (Carbon Nanotubes in Water: Structural Characteristics and Energetics).
> I created cnt.ff folder containing following files:
>
> ffcnt.atp / ffcnt.n2t / ffcnt.rtp / ffcntbon.itp / ffcntnonbon.itp /
> forcefield.itp
>
> Then, I put cnt.ff folder in GMXLIB directory.
> ------------------------------------------------------------------------------------
>
> 3) By g_x2top and cnt.ff created in previous step, I obtained cnt.top for
> cnt then I converted it into cnt.itp by deleting
>
> ; Include forcefield parameters
> #include "cnt.ff/forcefield.itp"
>
> from begining of file and by deleting
>
> [ system ]
> ; Name
> CNT
>
> [ molecules ]
> ; Compound        #mols
> CNT                 1
>
> from ending of file.
> ------------------------------------------------------------------------------------
>
> 4) I combined cnt and protein to create one coordination file (system.gro).
> Order of molecules are as follows: 1) cnt 2) protein
> 3) water.
> ------------------------------------------------------------------------------------
>
> 5) I wrote a topol.top file given below,
>
> ; Include forcefield parameters
> #include "cnt.ff/forcefield.itp"
>
> #include "cnt.itp"
>
> #include "charmm27.ff/forcefield.itp"
>
> #include "pr.itp"
>
> ; Include Position restraint file
> #ifdef POSRES
> #include "posre.itp"
> #endif
>
> ; Include water topology
> #include "charmm27.ff/tip3p.itp"
>
> #ifdef POSRES_WATER
> ; Position restraint for each water oxygen
> [ position_restraints ]
> ;  i funct       fcx        fcy        fcz
>     1    1       1000       1000       1000
> #endif
>
> ; Include topology for ions
> #include "charmm27.ff/ions.itp"
>
> [ system ]
> ; Name
> CNT/Protein/SOL
>
> [ molecules ]
> ; Compound        #mols
> CNT          1
> Protein      1
> SOL       1359
> ------------------------------------------------------------------------------------
>
> When I used grompp -f minim.mdp -c system.gro -p topol.top -o minim.tpr, I
> encountered with following error:
>
> Fatal error:
> Syntax error - File forcefield.itp, line 11
> Last line read:
> '[ defaults ]'
> Invalid order for directive defaults
>
> Content of forcefield.itp in cnt.ff directory is as follows:
>
> *******************************************************************************
> *                    CHARMM port writted
> by                                   *
> *                    Par Bjelkmar, Per Larsson, Michel
> Cuendet,               *
> *                    Berk Hess and Erik
> Lindahl.                              *
> *
> Correspondance:                                          *
> *                    bjelkmar at cbr.su.se or lindahl at cbr.su.se
> *
> *******************************************************************************
>
>
> #define _FF_CNT
> [ defaults ]
> ; nbfunc    comb-rule    gen-pairs    fudgeLJ    fudgeQQ
> 1    2    yes    1.0    1.0
>
> #include "ffcntnonbon.itp"
> #include "ffcntbon.itp"
>
> and
>
> Content of forcefield.itp in Charmm27.ff directory is as follows:
>
> *******************************************************************************
> *                    CHARMM port writted
> by                                   *
> *                    Par Bjelkmar, Per Larsson, Michel
> Cuendet,               *
> *                    Berk Hess and Erik
> Lindahl.                              *
> *
> Correspondance:                                          *
> *                    bjelkmar at cbr.su.se or lindahl at cbr.su.se
> *
> *******************************************************************************
>
>
> #define _FF_CHARMM
> [ defaults ]
> ; nbfunc    comb-rule    gen-pairs    fudgeLJ    fudgeQQ
> 1    2    yes    1.0    1.0
>
> #include "ffnonbonded.itp"
> #include "ffbonded.itp"
> #include "gb.itp"
> #include "cmap.itp"
> ; Nucleic acids nonbonded and bonded parameters"
> #include "ffnanonbonded.itp"
> #include "ffnabonded.itp"
> ------------------------------------------------------------------------------------
>
> In both of forcefield.itp files, line 11 is [ defaults ].
>
> I changed name of  forcefield.itp file in cnt.ff directory to cntff.itp,
> but there is same error, again.
>
> That is all what I exactly did. Is anything wrong or missing?
> How to solve this error?
>

You've already stated exactly what the problem is - you have two files that have 
a [defaults] directive.  You can't do that.  You can only define this directive 
once in a topology.

-Justin

-- 
==================================================

Justin A. Lemkul, Ph.D.
Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 601
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441

==================================================



More information about the gromacs.org_gmx-users mailing list