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