3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
33 * Green Red Orange Magenta Azure Cyan Skyblue
57 static void plot_rama(FILE *out
,t_xrama
*xr
)
62 for(i
=0; (i
<xr
->npp
); i
++) {
63 phi
=xr
->dih
[xr
->pp
[i
].iphi
].ang
*RAD2DEG
;
64 psi
=xr
->dih
[xr
->pp
[i
].ipsi
].ang
*RAD2DEG
;
65 fprintf(out
,"%g %g %s\n",phi
,psi
,xr
->pp
[i
].label
);
69 int gmx_rama(int argc
,char *argv
[])
71 const char *desc
[] = {
72 "g_rama selects the Phi/Psi dihedral combinations from your topology file",
73 "and computes these as a function of time.",
74 "Using simple Unix tools such as [IT]grep[it] you can select out",
83 { efTRX
, "-f", NULL
, ffREAD
},
84 { efTPX
, NULL
, NULL
, ffREAD
},
85 { efXVG
, NULL
, "rama",ffWRITE
}
87 #define NFILE asize(fnm)
89 CopyRight(stderr
,argv
[0]);
90 parse_common_args(&argc
,argv
,PCA_CAN_VIEW
| PCA_CAN_TIME
| PCA_BE_NICE
,
91 NFILE
,fnm
,0,NULL
,asize(desc
),desc
,0,NULL
,&oenv
);
95 init_rama(oenv
,ftp2fn(efTRX
,NFILE
,fnm
),ftp2fn(efTPX
,NFILE
,fnm
),xr
,3);
97 out
=xvgropen(ftp2fn(efXVG
,NFILE
,fnm
),"Ramachandran Plot","Phi","Psi",oenv
);
98 xvgr_line_props(out
,0,elNone
,ecFrank
,oenv
);
99 xvgr_view(out
,0.2,0.2,0.8,0.8,oenv
);
100 xvgr_world(out
,-180,-180,180,180,oenv
);
101 fprintf(out
,"@ xaxis tick on\n@ xaxis tick major 60\n@ xaxis tick minor 30\n");
102 fprintf(out
,"@ yaxis tick on\n@ yaxis tick major 60\n@ yaxis tick minor 30\n");
103 fprintf(out
,"@ s0 symbol 2\n@ s0 symbol size 0.4\n@ s0 symbol fill 1\n");
109 } while (new_data(xr
));
110 fprintf(stderr
,"\n");
113 do_view(oenv
,ftp2fn(efXVG
,NFILE
,fnm
),NULL
);