# [gmx-users] last line in .gro file

Vishal Agarwal vishal.iitian at gmail.com
Wed Feb 3 03:44:20 CET 2010

```Hi Tsjerk,

Thanks for replying. I was going through the pdb format dcoument on the PDB
webpage. I found that the box corresponds to the following:

a   b(cos(gama))  c(cos(beta))
0   b(sin(gama))   c(cos(alpha) - cos(beta) cos(gama) / sin(gama)
0    0                  V/(ab sin(gama))
where V = abc(1 - (cos(alpha))^2 - (cos(beta))^2 - (cos(gama))^2+
2cos(alpha) cos(beta) cos(gama))^1/2

This corresponds to general form in representing these vectors.  The
following code also desolves to this form.

Thank you again.

Best,
Vishal

P.S. I thank all who have replied to this mail.

On Tue, Feb 2, 2010 at 3:44 PM, Tsjerk Wassenaar <tsjerkw at gmail.com> wrote:

> Hi Vishal,
>
> Here is  a python function that generates a triclinic representation
> given a definition with lengths and angles. The argument L is a tuple
> or list containing the lengths and angles.
>
> def triclinic(L):
>    B = [[0,0,0],[0,0,0],[0,0,0]]
>
>    x, y, z, a, b, c = L[:6]
>
>    B[0][0] = x
>    if a == 90 and b == 90 and c == 90:
>        B[1][1] = y
>        B[2][2] = z
>    else:
>        a = a*pi/180
>        b = b*pi/180
>        c = c*pi/180
>        B[1][0] = y*cos(c)
>        B[1][1] = y*sin(c)
>        B[2][0] = z*cos(b)
>        B[2][1] = z*(cos(a)-cos(b)*cos(c))/sin(c)
>        B[2][2] = sqrt(z*z-B[2][0]**2-B[2][1]**2)
>
>    return B
>
> Hope it helps,
>
> Tsjerk
>
> On Tue, Feb 2, 2010 at 9:23 PM, Erik Marklund <erikm at xray.bmc.uu.se>
> wrote:
> > Hi,
> >
> > Since any unit cell can be formulated as a triclinic cell, the monoclinic
> > cell is indeed supported. By definition it has two 90 degree angles and
> one
> > that is not 90 degrees.  The box vectors can be of different lengths.
> You'll
> > have to do the math and reading yourself to find out how this translates
> to
> > a .gro box. The manual is your friend here.
> >
> > Good luck,
> >
> > Erik
> >
> > Vishal Agarwal skrev:
> >>
> >> Dear Justin,
> >>
> >> Thanks for replying. The table mentions only a few unit cell type. I am
> >> using a monclinic unit cell. Do you know how these box vectors have been
> >> derived.
> >>
> >> thanks
> >> vishal
> >>
> >> On Tue, Feb 2, 2010 at 11:26 AM, Justin A. Lemkul <jalemkul at vt.edu
> >> <mailto:jalemkul at vt.edu>> wrote:
> >>
> >>
> >>
> >>    Vishal Agarwal wrote:
> >>
> >>        Dear gmx-users,
> >>
> >>        I am new to GROMACS. Can anyone tell me what does the last
> >>        line in .gro file stands for ?
> >>
> >>        The manual mentions
> >>        "box[X][X],box[Y][Y],box[Z][Z],
> >>        box[X][Y],box[X][Z],box[Y][X],box[Y][Z],box[Z][X],box[Z][Y]"
> >>
> >>        Can anyone explain what each of these mean in terms of cell
> >>        parameters ?
> >>
> >>
> >>    The last line contains the box vectors.  Specifics in terms of
> >>    unit cell geometry are given in the manual, Table 3.1 and section
> >>    3.2.1.
> >>
> >>    -Justin
> >>
> >>        Thanks,
> >>        vishal
> >>
> >>
> >>    --    ========================================
> >>
> >>    Justin A. Lemkul
> >>    Ph.D. Candidate
> >>    ICTAS Doctoral Scholar
> >>    MILES-IGERT Trainee
> >>    Department of Biochemistry
> >>    Virginia Tech
> >>    Blacksburg, VA
> >>    jalemkul[at]vt.edu <http://vt.edu> | (540) 231-9080
> >>    http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
> >>
> >>    ========================================
> >>    --    gmx-users mailing list    gmx-users at gromacs.org
> >>    <mailto: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
> >>    <mailto:gmx-users-request at gromacs.org>.
> >>    Can't post? Read http://www.gromacs.org/mailing_lists/users.php
> >>
> >>
> >>
> >>
> >> --
> >> Regards
> >>
> >> ***********************************************
> >> Vishal Agarwal
> >> Research Scholar
> >> University of Massachusetts, Amherst
> >> ***********************************************
> >> 'Your only obligation in any lifetime is to be true to yourself."
> >>            ---Richard Bach
> >
> >
> > --
> > -----------------------------------------------
> > Erik Marklund, PhD student
> > Laboratory of Molecular Biophysics,
> > Dept. of Cell and Molecular Biology, Uppsala University.
> > Husargatan 3, Box 596,    75124 Uppsala, Sweden
> > phone:    +46 18 471 4537        fax: +46 18 511 755
> > erikm at xray.bmc.uu.se    http://xray.bmc.uu.se/molbiophys
> >
> > --
> > 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
> >
>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
> Computational Chemist
> Medicinal Chemist
> Neuropharmacologist
> --
> 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.
>

--
Regards

***********************************************
Vishal Agarwal
Research Scholar
University of Massachusetts, Amherst
***********************************************
'Your only obligation in any lifetime is to be true to yourself."
---Richard Bach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20100202/91ecac76/attachment.html>
```