[gmx-users] gmx gangle : How to calculate the angle between a vector and Z axis?

atb files atbfiles at zoho.com
Fri Jul 5 06:12:35 CEST 2019


        

        
            Hi Vikas,One way is transform your atomic trajectory to center of mass position trajectory. You can do it by first removing periodic breakages by running gmx trjconv -s gromos.tpr -f gromos.xtc -pbc whole -o whole.xtc Then run below command to get transform the atomic to center of mass position trajectory gmx traj -f whole.xtc -s gromos.tpr -oxt mapped.xtc -n mapping.ndx -com -ng 2Your mapping.ndx file should look like this (for example)[ 1 ] 1 2 3 [ 2 ] 5 6 7In your case, group1 is define by [1] where you will define index numbers of 3 residues, in place of 1 2 3 and of 4 residues for group [2].Now use gmx gangle command with  “-seltype res_com -selrpos -res_com” command. Obviously now your index.ndx file have indexes of [1] and [2] generated from mapped trajectory.-Yogesh Sent using Zoho Mail---- On Wed, 03 Jul 2019 13:59:39 +0530  Vikas Dubey<vikasdubey055 at gmail.com> wrote ----Dear all,  I have been trying to use gmx gangle for the calculation of the following angle : I have a group of 3 residues and another group of 4 residues. I want to define a vector which goes through the center of mass of these two groups and I am interested in calculating the angle  of the vector w.r.t to the Z-axis, which seems doable from the gmx gangle. based on the documentation, I write the following :  *gmx angle -f traj.xtc -s topol.tpr -n index.ndx -g1 -vector -g2 z -group1 <contains-all-the-atoms-in-aboved-mentioned-groups> -seltype res_com -selrpos -res_com -oav -all   *  but I don't think this is correct because I am calculating the center of mass of whole group. Is there a way to calculate this angle?  Thanks, --  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-request at gromacs.org. 
        
        

    
    



More information about the gromacs.org_gmx-users mailing list