#ifdef REST_ON
 #include "POT_rest.itp"
 #endif

should go at the end of POT_rest.itp file and

 #ifdef REST_ON
 #include "CL_rest.itp"
 #endif

should go at the end of CL.itp file. The restraint you listed restraints the first atom of every molecule of the type stated in the corresponding itp file. Since potassium and chloride ions are monoatomic, that should work fine.

Elsewise, you can just put the line

 #include "ionX_rest.itp"

at the end of the ionX.itp file which will turn on restraints automatically without having to define -DPOSIONX keyword in mdp file.

Gordan


On 7/16/2015 11:51 AM, anu chandra wrote:
Hi,

Thanks for your prompt reply. I have modified the top file as shown below.
Though it looks working fine for me, can you please have quick look into it.

***********************************************************************************************************
r
;       Force field was read from the standard Gromacs share directory.
;

; Include forcefield parameters
#include "charmm36-jun2015.ff/forcefield.itp"

; Include chain topologies
#include "topol_Protein.itp"
#include "topol_Protein2.itp"
#include "topol_Protein3.itp"
#include "topol_Protein4.itp"
#include "POPC.itp"

#include "POT.itp"

#ifdef REST_ON
#include "POT_rest.itp"
#endif

#include "CL.itp"

#ifdef REST_ON
#include "CL_rest.itp"
#endif

; Include water topology
#include "charmm36-jun2015.ff/tip3p.itp"


[ system ]
; Name
Titile

[ molecules ]
; Compound        #mols
Protein              1
Protein2            1
Protein3            1
Protein4            1
POPC              295
POT                 85
CL                   122
SOL                 24892
******************************************************************************************


And my POT_rest.itp and CL_rest have similar format as follows,


***************************************************************
; position restraints for POT of GROningen MAchine for Chemical Simulation

[ position_restraints ]
;  i funct       fcx        fcy        fcz
     1    1       1000       1000       1000

***********************************************************************

and I have ' define  = -DREST_ON ' in mdp file.


Hope what I am doing is right?


Many thanks
Anu


On Thu, Jul 16, 2015 at 7:32 AM, Gordan Horvat <ghor...@chem.pmf.hr> wrote:

You can copy the part regarding the certain ion type from ions.itp to a
separate itp file and #include that itp file into a top file. Then #include
the position restraint file that has restraints for only one ion of that
type at the end of that new itp file. By this manner you can even split a
group of same ions (for example, some potassium ions are restrained and
others are not) by making separate itp files for potassium ions in which
you specify different [ moleculetype ] names for each file and doing that
accordingly at the [ molecules ] table at the end of a top file. Of course,
when you split groups you need to know the positions of ions of interest in
a system structural file (gro or pdb), as they need to be listed in the
same order in the [ molecules ] table.

Gordan


On 7/16/2015 2:36 AM, Justin Lemkul wrote:



On 7/15/15 11:53 AM, anu chandra wrote:

Dear Gromcacs users,


I have carried out 25 ns simulation of membrane-protein systems. Now, I
would like to do position restrain of ions for the next 1-2 ns. I have
KCl
in my system. I used ' genrestr ' for generating the position restrain
for
ions  using the following command -

genrestr -f md50.gro -o ions-rest.itp

I have included ions-rest.itp in the .top file  with proper ' ifdef '
term
as mention in tutorials. Unfortunately, the grommp shows error message
-  "
Atom index (2) in position_restraints out of bounds (1-1). This probably
means that you have inserted topology section "position_restraints"
in a part belonging to a different molecule than you intended to" . I
have
seen from Gromcas mail list that many faced similar issues and this
usually
comes from the mismatch in atom indices. Unfortunately, I could not find
complete solution for it yet. Few queries in this regard are,

1. How can I generate a position restrain file for ions or any set of
molecules in the system? my topology file have following hierarchy,

****************************************************************
;       This is a standalone topology file
;
;       Created by:
;       GROMACS:      gmx pdb2gmx, VERSION 5.0.4
;       Executable:   /usr/local/gromacs/bin/gmx
;       Library dir:  /usr/local/gromacs/share/gromacs/top
;       Command line:
;         gmx pdb2gmx -f step5_IP3R.pdb -ter
;       Force field was read from the standard Gromacs share directory.
;

; Include forcefield parameters
#include "charmm36-jun2015.ff/forcefield.itp"

; Include chain topologies
#include "topol_Protein.itp"
#include "topol_Protein2.itp"
#include "topol_Protein3.itp"
#include "topol_Protein4.itp"
#include "POPC.itp"

; Include water topology
#include "charmm36-jun2015.ff/tip3p.itp"

; Include topology for ions
#include "charmm36-jun2015.ff/ions.itp"

[ system ]
; Name
Titile

[ molecules ]
; Compound        #mols
Protein             1
Protein2            1
Protein3            1
Protein4            1
POPC              295
POT                 85
CL                   122
SOL                24892

****************************************************************************


2. Where all I can use the .itp file for a particular group generate
with '
genrestr' command?


Restraints are applied on a per-moleculetype basis; hence genrestr is
very limited in what it can do (multiple molecules won't work without
considerable effort).

The only way to restrain the ions within this setup is to modify
ions.itp to specify restraints within the relevant [moleculetype]
directives.

-Justin



--
Gromacs Users mailing list

* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
send a mail to gmx-users-requ...@gromacs.org.



--
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.

Reply via email to