So in my opinion, an easy way is separating each chain of your structure, generate position restrain for them separately and then adding into topology file of each chain
On Tue, Mar 5, 2019 at 1:18 PM Justin Lemkul <jalem...@vt.edu> wrote: > > > On 3/5/19 7:12 AM, morpheus wrote: > > Thanks for your answer! > > > > I have followed your advice and generated the position restraint files > for > > each chain but it still comes up with an index error: > > > > ################## > > Fatal error: > > [ file 2bnr_SLLDWITQV_dist_1.0.posre_Protein_chain_B.itp, line 5 ]: > > Atom index (2975) in position_restraints out of bounds (1-1111). > > ################## > > > > What I have done was the following: > > > > > > 1) Create an index file from based on a pdb file that is the first frame > > of the warming up procedure (where all atoms are position restrained (and > > this works fine)): > > > > ################## > > make_ndx_mpi -f 2bnr_SLLDWITQV_dist_1.0.firstFrame.pr.pdb -o > > 2bnr_SLLDWITQV_dist_1.0.indexForPositionRestraints.ndx > > chain A & 4 > > chain B & 4 > > chain C & 4 > > chain D & 4 > > chain E & 4 > > ################## > > > > > > 2) Create 1 itp file for each chain (example for chain A is given below): > > > > ################## > > genrestr_mpi -f 2bnr_SLLDWITQV_dist_1.0.pdb -n > > 2bnr_SLLDWITQV_dist_1.0.indexForPositionRestraints.ndx -o > > 2bnr_SLLDWITQV_dist_1.0.posre_Protein_chain_A.itp > > 11 > > ################## > > > > 3) In the top file "2bnr_SLLDWITQV_dist_1.0_Protein_chain_A.itp" (and > the 5 > > others) are included. They contain the indexes of all atoms. This file > > looks like this: > > > > ################## > > [ moleculetype ] > > ; Name nrexcl > > Protein_chain_A 3 > > > > [ atoms ] > > ; nr type resnr residue atom cgnr charge mass > > typeB chargeB massB > > ; residue 1 GLY rtp GLY q +1.0 > > 1 MNH3 1 GLY MN1 1 0 8.51535 ; > > qtot 0 > > 2 MNH3 1 GLY MN2 1 0 8.51535 ; > > qtot 0 > > 3 NL 1 GLY N 1 0.129 0 ; > > qtot 0.129 > > 4 H 1 GLY H1 1 0.248 0 ; > > qtot 0.377 > > 5 H 1 GLY H2 1 0.248 0 ; > > qtot 0.625 > > 6 H 1 GLY H3 1 0.248 0 ; > > qtot 0.873 > > 7 CH2 1 GLY CA 2 0.127 14.027 ; > > qtot 1 > > 8 C 1 GLY C 3 0.45 12.011 ; > > qtot 1.45 > > 9 O 1 GLY O 3 -0.45 15.9994 ; > > qtot 1 > > ; residue 2 SER rtp SER q 0.0 > > 10 N 2 SER N 4 -0.31 15.0147 ; > > qtot 0.69 > > 11 H 2 SER H 4 0.31 0 ; > > qtot 1 > > 12 CH1 2 SER CA 5 0 13.019 ; > > qtot 1 > > 13 CH2 2 SER CB 6 0.266 14.027 ; > > qtot 1.266 > > [...] > > ; Include Position restraint file > > #ifdef POSRES > > #include "2bnr_SLLDWITQV_dist_1.0.posre_Protein_chain_A.itp" > > #endif > > > > > > or like this for chain B > > > > > > [ moleculetype ] > > ; Name nrexcl > > Protein_chain_B 3 > > > > [ atoms ] > > ; nr type resnr residue atom cgnr charge mass > > typeB chargeB massB > > ; residue 0 MET rtp MET q +1.0 > > 1 MNH3 0 MET MN1 1 0 8.51535 ; > > qtot 0 > > 2 MNH3 0 MET MN2 1 0 8.51535 ; > > qtot 0 > > 3 NL 0 MET N 1 0.129 0 ; > > qtot 0.129 > > 4 H 0 MET H1 1 0.248 0 ; > > qtot 0.377 > > 5 H 0 MET H2 1 0.248 0 ; > > qtot 0.625 > > 6 H 0 MET H3 1 0.248 0 ; > > qtot 0.873 > > 7 CH1 0 MET CA 2 0.127 13.019 ; > > qtot 1 > > 8 CH2 0 MET CB 2 0 14.027 ; > > qtot 1 > > 9 CH2 0 MET CG 3 0.241 14.027 ; > > qtot 1.241 > > 10 S 0 MET SD 3 -0.482 32.06 ; > > qtot 0.759 > > 11 CH3 0 MET CE 3 0.241 15.035 ; > > qtot 1 > > 12 C 0 MET C 4 0.45 12.011 ; > > qtot 1.45 > > 13 O 0 MET O 4 -0.45 15.9994 ; > > qtot 1 > > ; residue 1 ILE rtp ILE q 0.0 > > 14 N 1 ILE N 5 -0.31 15.0147 ; > > qtot 0.69 > > 15 H 1 ILE H 5 0.31 0 ; > > qtot 1 > > 16 CH1 1 ILE CA 6 0 13.019 ; > > qtot 1 > > 17 CH1 1 ILE CB 7 0 13.019 ; > > qtot 1 > > 18 CH2 1 ILE CG1 7 0 14.027 ; > > qtot 1 > > 19 CH3 1 ILE CG2 7 0 15.035 ; > > qtot 1 > > 20 CH3 1 ILE CD 7 0 15.035 ; > > qtot 1 > > 21 C 1 ILE C 8 0.45 12.011 ; > > qtot 1.45 > > 22 O 1 ILE O 8 -0.45 15.9994 ; > > qtot 1 > > [...] > > ; Include Position restraint file > > #ifdef POSRES > > #include "2bnr_SLLDWITQV_dist_1.0.posre_Protein_chain_B.itp" > > #endif > > > > > > ################## > > > > > > 4) At the same time I have the newly created itp file that contains the > > force restraints (which unit is the 1000 actually here?) and seems to be > > linked to the first itp file via the include (see above). The content of > my > > new file is: > > > > ################## > > ; position restraints for chA_&_Backbone of > > > > [ position_restraints ] > > ; i funct fcx fcy fcz > > 3 1 1000 1000 1000 > > 7 1 1000 1000 1000 > > 8 1 1000 1000 1000 > > 10 1 1000 1000 1000 > > 12 1 1000 1000 1000 > > 16 1 1000 1000 1000 > > 18 1 1000 1000 1000 > > 20 1 1000 1000 1000 > > 30 1 1000 1000 1000 > > 32 1 1000 1000 1000 > > [...] > > > > > > or for chain B: > > > > ; position restraints for chB_&_Backbone of > > > > [ position_restraints ] > > ; i funct fcx fcy fcz > > 2975 1 1000 1000 1000 > > 2979 1 1000 1000 1000 > > 2984 1 1000 1000 1000 > > 2986 1 1000 1000 1000 > > 2988 1 1000 1000 1000 > > 2993 1 1000 1000 1000 > > [...] > > > > ################## > > > > > > Why does this not work together? It seems to be a problem of absolute vs > > relative index? But what do I needed to do differently in order to make > > this work? > > The only valid atom numbers in a position restraint index file are 1..N, > where N is the number of atoms in the corresponding [moleculetype]. Note > that genrestr tells you this: > > "WARNING: Position restraints are interactions within molecules, > therefore they > must be included within the correct [ moleculetype ] block in the topology. > The atom indices within the [ position_restraints ] block must be within > the > range of the atom indices for that molecule type. Since the atom numbers in > every moleculetype in the topology start at 1 and the numbers in the input > file for gmx genrestr number consecutively from 1, gmx genrestr will only > produce a useful file for the first molecule. You may wish to edit the > resulting index file to remove the lines for later atoms, or construct a > suitable index group to provide as input to gmx genrestr." > > As a simple rule, if you are ever running genrestr on a coordinate file > that has multiple molecules in it, you will not get what you want (there > are ways around it, but that is an easy way to think of it). > > -Justin > > > > > Thanks! > > M > > > > > > > > > > > > > > Previous message: [gmx-users] position restraints on backbone: index > error > > < > https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users/2019-March/124461.html > > > > > > Hi, > > Position restraints are per molecule. > > if you separate your molecule like that, the position restraints of > > backbone should be generated for each chain base on indices of each chain > > and include it in the topology of the chain, not global topology like > that. > > so for example, if you want restraint backbone of chain E, you have to > > generate position restraint base on the topology of chain E and include > him > > in 2bnr_SLLDWITQV_dist_1.0_Protein_chain_E.itp > > > > On Fri, Mar 1, 2019 at 10:53 AM morpheus <morpheus.sommer2008 at > > gmail.com < > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users>> > > wrote: > > > >> * Dear Gromacs users, > > *>>* I would like to run protein/protein interaction simulation > (consisting of 5 > > *>* chains) that holds the backbone atoms rigid but allows side-chain > > *>* movements. According to the Gromacs documentation this should work > by: > > *>>* "Special position restraint .itp files can be created using the > genrestr > > *>* utility [...]. For example, if you wish to apply position > restraints to > > *>* only the backbone atoms of your protein, use genrestr and choose > "Backbone" > > *>* as the output group, and #include "backbone_posre.itp" in your > topology." > > *>* [1] > > *>>* I can generate the .itp file as described above but if I include it > in my > > *>* .top file then I get the following error: > > *>>* ########### > > *>* Fatal error: > > *>* [ file backbone_posre.itp, line 687 ]: > > *>* Atom index (2472) in position_restraints out of bounds (1-2471). > > *>* This probably means that you have inserted topology section > > *>* "position_restraints" > > *>* in a part belonging to a different molecule than you intended to. > > *>* In that case move the "position_restraints" section to the right > molecule. > > *>* For more information and tips for troubleshooting, please check the > GROMACS > > *>* website at http://www.gromacs.org/Documentation/Errors > > <http://www.gromacs.org/Documentation/Errors> > > *>* ########### > > *>>>* My top file looks like below and I have added the #include > > *>* "backbone_posre.itp" part manually. > > *>>>* ########### > > *>* ; Include forcefield parameters > > *>* #include "gromos53a6.ff/forcefield.itp" > > *>>* ; Include chain topologies > > *>* #include "2bnr_SLLDWITQV_dist_1.0_Protein_chain_A.itp" > > *>* #include "2bnr_SLLDWITQV_dist_1.0_Protein_chain_B.itp" > > *>* #include "2bnr_SLLDWITQV_dist_1.0_Protein_chain_C.itp" > > *>* #include "2bnr_SLLDWITQV_dist_1.0_Protein_chain_D.itp" > > *>* #include "2bnr_SLLDWITQV_dist_1.0_Protein_chain_E.itp" > > *>* #include "backbone_posre.itp" > > *>>* ; Include water topology > > *>* #include "gromos53a6.ff/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 topology for ions > > *>* #include "gromos53a6.ff/ions.itp" > > *>>* [ system ] > > *>* ; Name > > *>* Protein in water > > *>* ########### > > *>>* What does "different molecule" mean in the error message? It should > apply > > *>* to all protein chains ... or in other words: what do I need to > change to > > *>* make this one run? > > *>>* Thanks!! > > *>>* M > > *>>>* [1] > http://www.gromacs.org/Documentation/How-tos/Position_Restraints > > <http://www.gromacs.org/Documentation/How-tos/Position_Restraints> > > *>* -- > > *>* Gromacs Users mailing list > > *>>* * Please search the archive at > > *>* http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List > > <http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List> before > > *>* posting! > > *>>* * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > > <http://www.gromacs.org/Support/Mailing_Lists> > > *>>* * For (un)subscribe requests visit > > *>* https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users > > <https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users> > > or > > *>* send a mail to gmx-users-request at gromacs.org. > > <https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users> > > *> > > -- > ================================================== > > Justin A. Lemkul, Ph.D. > Assistant Professor > Office: 301 Fralin Hall > Lab: 303 Engel Hall > > Virginia Tech Department of Biochemistry > 340 West Campus Dr. > Blacksburg, VA 24061 > > jalem...@vt.edu | (540) 231-3129 > http://www.thelemkullab.com > > ================================================== > > -- > 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.