[gmx-users] position restraints

Justin A. Lemkul jalemkul at vt.edu
Thu Jun 3 16:57:58 CEST 2010


Have you seen the example here?

http://www.gromacs.org/Documentation/Errors#Invalid_order_for_directive_defaults

What you need to do is place your [position_restraints] directive after the 
moleculetype to which it belongs, but before any other moleculetype has been 
introduced (usually by #including another topology, which introduces a new 
molecule, and hence, moleculetype).

The example I mentioned regarding posre.itp is to demonstrate exactly how this 
is done.  The posre.itp file is produced by pdb2gmx and is used to restrain the 
heavy atoms of the protein.  It is #included (basically inserting the relevant 
[position_restraints] directive) at the end of the Protein_A moleculetype 
definition, but prior to the #include "spc.itp" statement, which starts the SPC 
water moleculetype definition.

So the topology is like this:

[ moleculetype ]
Protein

(atoms, bonds, other stuff...)

[ position_restraints ] <- Note how it is placed before the next moleculetype.

[ moleculetype ] <- This part comes from the #include "spc.itp" statement.
SOL

etc.

-Justin

abdullah ahmed wrote:
> Hi,
> 
> Sorry to bother you again, but I am new to gromacs and many theings 
> don't make sense yet.
> I have tried reading the manual but I do not understand what you mean by 
> "Note how the automatically-generated "posre.itp" file is #included at 
> the end of the Protein_A moleculetype, *before* any other molecules are 
> introduced. You have to do the same with any new #include statements or 
> directives you add."
> 
> I tried using #include in front of my code for [position_restraints] but 
> that just gives an error. So I suppose that isn't what you mean.
> Furthermore, in section 5.7.1 of the manual pg110 an example topology 
> file called urea.top is shown. there is no include there.
> 
> In this example .top file they just seem to have added the position 
> restraints they want after the dihedrals. This approach does not seem to 
> be working for me and I can not understand why.
> 
> Thank you again for your help,
> Abdullah
> 
>  > Date: Thu, 3 Jun 2010 09:43:18 -0400
>  > From: jalemkul at vt.edu
>  > To: gmx-users at gromacs.org
>  > Subject: Re: [gmx-users] position restraints
>  >
>  >
>  >
>  > abdullah ahmed wrote:
>  > > Hi!
>  > >
>  > > In your previous mail you mentioned:
>  > >
>  > > The position restraints must belong to the [moleculetype] of
>  > > the species to be restrained. * Once you #include a new molecule, you
>  > > start a new
>  > > [moleculetype] entry and the position restraints belong to it. *
>  > >
>  > >
>  > > So I rechecked my .top file and found that [moleculetype] only occurs
>  > > once. Perhaps I have misunderstood you. So I added the top file 
> below. I
>  >
>  > No it doesn't. Each time you #include a new .itp file, you are 
> telling grompp
>  > to copy and paste the contents of that .itp file in that location. 
> Have a look
>  > at spc.itp - it starts a new moleculetype.
>  >
>  > http://www.gromacs.org/Documentation/Include_File_Mechanism
>  >
>  > Note how the automatically-generated "posre.itp" file is #included at 
> the end of
>  > the Protein_A moleculetype, *before* any other molecules are 
> introduced. You
>  > have to do the same with any new #include statements or directives 
> you add.
>  >
>  > -Justin
>  >
>  > > did not add the contents of [atoms] [bonds] etc because I felt the 
> mail
>  > > would become unnecessarily long.
>  > >
>  > > ; Include forcefield parameters
>  > > #include "ffoplsaa.itp"
>  > >
>  > > [ moleculetype ]
>  > > ; Name nrexcl
>  > > Protein_A 3
>  > >
>  > > [ atoms ]
>  > >
>  > > [ bonds ]
>  > >
>  > > [ pairs ]
>  > >
>  > > [ angles ]
>  > >
>  > > [ dihedrals ]
>  > >
>  > > [ dihedrals ]
>  > >
>  > > ; Include Position restraint file
>  > > #ifdef POSRES
>  > > #include "posre.itp"
>  > > #endif
>  > >
>  > > ; Include water topology
>  > > #include "spc.itp"
>  > >
>  > > #ifdef POSRES_WATER
>  > > ; Position restraint for each water oxygen
>  > > [ position_restraints ]
>  > > ; i funct fcx fcy fcz
>  > > 1 1 1000 1000 1000
>  > > #endif
>  > >
>  > > ; Include generic topology for ions
>  > > #include "ions.itp"
>  > >
>  > > [ system ]
>  > > ; Name
>  > > Protein
>  > >
>  > > [ molecules ]
>  > > ; Compound #mols
>  > > Protein_A 1
>  > >
>  > > Thanks again for your help,
>  > > Abdullah
>  > >
>  > >
>  > > 
> ------------------------------------------------------------------------
>  > > Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign
>  > > up now. <https://signup.live.com/signup.aspx?id=60969>
>  >
>  > --
>  > ========================================
>  >
>  > Justin A. Lemkul
>  > Ph.D. Candidate
>  > ICTAS Doctoral Scholar
>  > MILES-IGERT Trainee
>  > Department of Biochemistry
>  > Virginia Tech
>  > Blacksburg, VA
>  > jalemkul[at]vt.edu | (540) 231-9080
>  > http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
>  >
>  > ========================================
>  > --
>  > gmx-users mailing list gmx-users at gromacs.org
>  > http://lists.gromacs.org/mailman/listinfo/gmx-users
>  > Please search the archive at http://www.gromacs.org/search before 
> posting!
>  > Please don't post (un)subscribe requests to the list. Use the
>  > www interface or send it to gmx-users-request at gromacs.org.
>  > Can't post? Read http://www.gromacs.org/mailing_lists/users.php
> 
> ------------------------------------------------------------------------
> Hotmail: Powerful Free email with security by Microsoft. Get it now. 
> <https://signup.live.com/signup.aspx?id=60969>

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

Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
MILES-IGERT Trainee
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

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



More information about the gromacs.org_gmx-users mailing list