Hi Peggy, This is very much basic stuff for which you should refer to the manual/wiki. E.g. on the index file, look at
http://wiki.gromacs.org/index.php/Index_File For the other questions, check the manpages of editconf, trjconv and tpbconv. Cheers, Tsjerk On Thu, Apr 10, 2008 at 11:03 PM, Peggy Yao <[EMAIL PROTECTED]> wrote: > Thank you for the explanation! > > In fact, 2 Ca atoms are a part of the protein. They are in the PDB file > passed to pdb2gmx. Water molecules are added after the protein atoms and the > Ca atoms, as in the PDB file after genbox. So I suppose, in the .tpr file, > atoms should be ordered as protein-Ca-water-Cl? > > If I still have to do what you suggested, could you kindly tell me: > 1. what is an index file? > 2. how to make an index file to extract the matching set of atoms from .tpr > file? > 3. how to write a matching reference structure? > > Thanks a lot! > > Peggy > > > > On Thu, Apr 10, 2008 at 11:52 AM, Tsjerk Wassenaar <[EMAIL PROTECTED]> > wrote: > > Hi Peggy, > > > > The key thing is that there's a mismatch between your .tpr file and > > your .xtc file. The first is used for the indexing and it may very > > well be that there's stuff in between the protein and the calcium. > > That way, the index number for Ca, which should be N(protein) + 1, is > > actually N(protein) + N(solvent) + 1. Now the list of atoms in the > > .xtc file is only N(protein) + N(Ca) + N(Cl) and the atom you're > > trying to fetch brings you to a part of memory you're not allowed to > > touch (index > N(protein) + N(Ca) + N(Cl)): a segmentation fault > > > > But since you did write out correctly, the solution is simple. First > > make an index file to extract the matching set of atoms from the .tpr > > file. Then write a matching reference structure. If you really need a > > matching .tpr file, you can do it with tpbconv. Now with a matching > > reference structure, you can do just what you want... > > > > Cheers, > > > > Tsjerk > > > > > > > > > > On Thu, Apr 10, 2008 at 6:42 PM, Peggy Yao <[EMAIL PROTECTED]> wrote: > > > Thank you for your reply, Tsjerk! > > > > > > I used gmxcheck, and got exactly the same number of atoms in xtc file as > > > #proteinAtoms+#calciumAtoms+#chlorideAtom. > > > > > > I also checked my mdp file. It does have "xtc_grps = protein Ca Cl". > > > > > > In previous similar runs, I successfully wrote these atoms out. The only > > > difference is that, in previous runs, I added some Na+ ions too. At the > end > > > of the .top file, I had: > > > Protein_A 1 > > > Na 15 > > > Cl 12 > > > SOL 7254 > > > And, in mdp file, I had: xtc_grps = protein Ca Na Cl > > > > > > But this time, I didn't add any Na+ ion. After genion step, the end of > the > > > .top file became: > > > Protein_A 1 > > > SOL 7280 > > > Na 0 > > > Cl 1 > > > In mdp file, I had: xtc_grps = protein Ca Cl > > > > > > Will this difference cause the problem? How should I solve it? Thanks a > lot! > > > > > > Peggy > > > > > > > > > > > > On Thu, Apr 10, 2008 at 12:22 AM, Tsjerk Wassenaar <[EMAIL PROTECTED]> > > > wrote: > > > > > > > Hi Peggy, > > > > > > > > I suspect that in your .mdp file you have a line > > > > > > > > xtc-grps = Protein > > > > > > > > This means that the xtc file will only contain those atoms which > > > > gromacs reckognizes as amino acids, based on the list in the file > > > > aminoacids.dat. Your .tpr file which is used to base the index on, > > > > contains all atoms, including the Ca/Cl. You can easily check how many > > > > atoms there are in your xtc file using gmxcheck and compare this to > > > > the groups you see based on the .tpr as you've given. If you need the > > > > calcium and chloride in the trajectory while you've only written > > > > Protein, you'll have to redo the simulation, changing the xtc-grps > > > > line in the .mdp, copy the file aminoacids.dat and add the ions to it > > > > or use an index file when running grompp. Of course you can first have > > > > a look at teh .trr file which contains all atoms by definition, but > > > > that is usually written much less frequent. > > > > > > > > Cheers, > > > > > > > > Tsjerk > > > > > > > > > > > > > > > > > > > > On Thu, Apr 10, 2008 at 8:27 AM, Peggy Yao <[EMAIL PROTECTED]> > wrote: > > > > > Hi all, > > > > > > > > > > In my system, I have 1 protein, 2 calcium atoms, and 1 chloride > atom. > > > When I > > > > > used trjconv to write the protein out as PDB file, it worked fine. > > > However, > > > > > when I tried to write the calciums and chloride out using the same > > > command > > > > > (but selecting different group to write out), I got the following > fatal > > > > > error: > > > > > > > > > > for calcium: > > > > > Select group for output > > > > > Opening library file /usr/share/gromacs/top/aminoacids.dat > > > > > Group 0 ( System) has 22737 elements > > > > > Group 1 ( Protein) has 894 elements > > > > > Group 2 ( Protein-H) has 707 elements > > > > > Group 3 ( C-alpha) has 89 elements > > > > > Group 4 ( Backbone) has 267 elements > > > > > Group 5 ( MainChain) has 357 elements > > > > > Group 6 (MainChain+Cb) has 440 elements > > > > > Group 7 ( MainChain+H) has 447 elements > > > > > Group 8 ( SideChain) has 447 elements > > > > > Group 9 ( SideChain-H) has 350 elements > > > > > Group 10 ( Prot-Masses) has 894 elements > > > > > Group 11 ( Non-Protein) has 21843 elements > > > > > Group 12 ( Ca) has 2 elements > > > > > Group 13 ( SOL) has 21840 elements > > > > > Group 14 ( Cl) has 1 elements > > > > > Group 15 ( Other) has 21843 elements > > > > > Select a group: 12 > > > > > Selected 12: 'Ca' > > > > > Reading frame 0 time 0.000 > > > > > Precision of traj.xtc is 0.001 (nm) > > > > > Segmentation fault 3 time 150.000 -> frame 3 time > 150.000 > > > > > > > > > > for chloride: > > > > > Select group for output > > > > > Opening library file /usr/share/gromacs/top/aminoacids.dat > > > > > Group 0 ( System) has 22737 elements > > > > > Group 1 ( Protein) has 894 elements > > > > > Group 2 ( Protein-H) has 707 elements > > > > > Group 3 ( C-alpha) has 89 elements > > > > > Group 4 ( Backbone) has 267 elements > > > > > Group 5 ( MainChain) has 357 elements > > > > > Group 6 (MainChain+Cb) has 440 elements > > > > > Group 7 ( MainChain+H) has 447 elements > > > > > Group 8 ( SideChain) has 447 elements > > > > > Group 9 ( SideChain-H) has 350 elements > > > > > Group 10 ( Prot-Masses) has 894 elements > > > > > Group 11 ( Non-Protein) has 21843 elements > > > > > Group 12 ( Ca) has 2 elements > > > > > Group 13 ( SOL) has 21840 elements > > > > > Group 14 ( Cl) has 1 elements > > > > > Group 15 ( Other) has 21843 elements > > > > > Select a group: 14 > > > > > Selected 14: 'Cl' > > > > > Reading frame 0 time 0.000 > > > > > Precision of traj.xtc is 0.001 (nm) > > > > > ------------------------------------------------------- > > > > > Program trjconv, VERSION 3.3.2 > > > > > Source code file: gmx_trjconv.c, line: 994 > > > > > Fatal error: > > > > > Index[0] 22737 is larger than the number of atoms in the trajectory > file > > > > > (897) > > > > > ------------------------------------------------------- > > > > > > > > > > Does anybody know what might be wrong? Maybe the .tpr or .xtc files > are > > > not > > > > > complete? Is there any way to check? Thanks! > > > > > > > > > > Peggy > > > > > _______________________________________________ > > > > > gmx-users mailing list gmx-users@gromacs.org > > > > > http://www.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 [EMAIL PROTECTED] > > > > > Can't post? Read http://www.gromacs.org/mailing_lists/users.php > > > > > > > > > > > > > > > > > > > > > -- > > > > Tsjerk A. Wassenaar, Ph.D. > > > > Junior UD (post-doc) > > > > Biomolecular NMR, Bijvoet Center > > > > Utrecht University > > > > Padualaan 8 > > > > 3584 CH Utrecht > > > > The Netherlands > > > > P: +31-30-2539931 > > > > F: +31-30-2537623 > > > > _______________________________________________ > > > > gmx-users mailing list gmx-users@gromacs.org > > > > http://www.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 [EMAIL PROTECTED] > > > > Can't post? Read http://www.gromacs.org/mailing_lists/users.php > > > > > > > > > > > > > _______________________________________________ > > > gmx-users mailing list gmx-users@gromacs.org > > > http://www.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 [EMAIL PROTECTED] > > > Can't post? Read http://www.gromacs.org/mailing_lists/users.php > > > > > > > > > > > -- > > Tsjerk A. Wassenaar, Ph.D. > > Junior UD (post-doc) > > Biomolecular NMR, Bijvoet Center > > Utrecht University > > Padualaan 8 > > 3584 CH Utrecht > > The Netherlands > > P: +31-30-2539931 > > F: +31-30-2537623 > > _______________________________________________ > > gmx-users mailing list gmx-users@gromacs.org > > http://www.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 [EMAIL PROTECTED] > > Can't post? Read http://www.gromacs.org/mailing_lists/users.php > > > > > _______________________________________________ > gmx-users mailing list gmx-users@gromacs.org > http://www.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 [EMAIL PROTECTED] > Can't post? Read http://www.gromacs.org/mailing_lists/users.php > -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 _______________________________________________ gmx-users mailing list gmx-users@gromacs.org http://www.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 [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php