changed reading hint
[gromacs/adressmacs.git] / src / tools / cdist.h
blob80d1596608e9e6d3aceddc6779630534a0c54034
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Great Red Oystrich Makes All Chemists Sane
29 static char *SRCID_cdist_h = "$Id$";
31 #define HEAD_LOADED
32 #include <stdio.h>
33 #include <math.h>
34 #include "typedefs.h"
35 #include "statutil.h"
36 #include "fatal.h"
37 #include "physics.h"
38 #include "string2.h"
39 #include "smalloc.h"
40 #include "macros.h"
41 #include "futil.h"
42 #include "copyrite.h"
43 #include "vec.h"
44 #include "pdbio.h"
46 typedef struct {
47 real lb,ub,len;
48 } t_dist;
50 /* LIST OF FUNCTIONS */
52 extern void pdih_lengths(int ai,int aj,int ak,int al,
53 t_ilist ilist[],t_iparams iparams[],
54 real *lb,real *ub,t_atoms *atoms);
56 extern real idih_lengths(int ai,int aj,int ak,int al,
57 t_ilist ilist[],t_iparams iparams[],t_atoms *atoms);
59 extern bool dist_set(t_dist *d,int natoms,int ai,int aj);
61 extern void set_dist(t_dist *d,int natoms,int ai,int aj,real lb,real ub,
62 real len);
64 extern void read_O_dist(void);
66 #define NOBOND -666
67 extern real lookup_bondlength(int ai,int aj,t_ilist ilist[],
68 t_iparams iparams[],bool bFail,t_atoms *atoms);
69 /* Return the bondlength in Angstrom, or NOBOND if not found.
70 * If not found and bFail, a fatal_error will be issued
73 extern real lookup_angle(int ai,int aj,int ak,t_ilist ilist[],
74 t_iparams iparams[],t_atoms *atoms);
75 /* Return the angle between atoms in radians */
77 extern real angle_length(int ai,int aj,int ak,real theta,
78 t_ilist ilist[],t_iparams iparams[],t_atoms *atoms);
79 /* Return the distance corresponding to atoms in Angstrom
82 extern void gauche(int ai,int aj,int ak,int al,t_ilist ilist[],
83 t_iparams iparams[],real *lb,t_atoms *atoms);
85 extern void gauche15(int ai,int aj,int ak,int al,int am,real omega1,
86 real omega2,real omega3,
87 t_ilist ilist[],t_iparams iparams[],real *lb,
88 t_atoms *atoms);
90 extern real d_len(t_dist *d,int natoms,int ai,int aj);
91 extern real d_ub(t_dist *d,int natoms,int ai,int aj);
92 extern real d_lb(t_dist *d,int natoms,int ai,int aj);
94 /* FUNCTIONS cdist.c calls */
96 void do_smooth (t_dist *d,t_atoms *atoms,real tol);
97 int do_triangle (t_dist *d,t_atoms *atoms,real tol);
98 int triangle_upper_bound (t_dist *d,int natoms,real tol);
99 int triangle_lower_bound (t_dist *d,int natoms,real tol);
100 /* Return the number of smoothing operations */
102 /* OTHER FUNCTIONS */
103 extern int set_virtual (int *ATMS,int N,real margin,t_dist *d,int natoms);
105 /* Routines from residues.c */
106 extern void peptide_bonds (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,
107 real weight[], real pep_margin,
108 t_ilist ilist[],t_iparams iparams[],bool bVir);
110 extern void arg (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
111 real arg_margin,t_ilist ilist[],
112 t_iparams iparams[],bool bVir);
114 extern void asn (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
115 real end_margin,t_ilist ilist[],
116 t_iparams iparams[],bool bVir);
118 extern void gln (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
119 real end_margin,t_ilist ilist[],
120 t_iparams iparams[],bool bVir);
122 extern void phe (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
123 real ring_margin,t_ilist ilist[],
124 t_iparams iparams[],bool bVir);
126 extern void tyr (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
127 real ring_margin,t_ilist ilist[],
128 t_iparams iparams[],bool bVir);
130 extern void trp (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
131 real ring_margin,t_ilist ilist[],
132 t_iparams iparams[],bool bVir);
134 extern void hisb(FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
135 real ring_margin,t_ilist ilist[],
136 t_iparams iparams[],bool bVir);
138 extern void val (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
139 real val_margin,t_ilist ilist[],t_iparams iparams[]);
141 extern void leu (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
142 real leu_margin,t_ilist ilist[],t_iparams iparams[]);
144 extern void ile (FILE *log,t_dist *d,t_idef *idef,t_atoms *atoms,real weight[],
145 real ile_margin,t_ilist ilist[],t_iparams iparams[]);
148 #endif