Re: [gmx-users] last line in .gro file

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 <er...@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 <jalem...@vt.edu
>> <mailto:jalem...@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-us...@gromacs.org
>>    <mailto:gmx-users@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-requ...@gromacs.org
>>    <mailto:gmx-users-requ...@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
> er...@xray.bmc.uu.se    http://xray.bmc.uu.se/molbiophys
>
> --
> gmx-users mailing list    gmx-us...@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-requ...@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@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-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php