-
Notifications
You must be signed in to change notification settings - Fork 0
/
topo_defs_struct.h
138 lines (119 loc) · 2.95 KB
/
topo_defs_struct.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#ifndef TOPO_DEFS_STRUCT_H
#define TOPO_DEFS_STRUCT_H
#include "memarena.h"
#include "hasharray.h"
#include "topo_defs.h"
#define NAMEMAXLEN 8
#define NAMETOOLONG(X) ( strlen(X) >= NAMEMAXLEN )
typedef struct topo_defs_type_t {
char name[NAMEMAXLEN];
char element[NAMEMAXLEN];
int id;
double mass;
} topo_defs_type_t;
typedef struct topo_defs_atom_t {
struct topo_defs_atom_t *next;
char name[NAMEMAXLEN];
char type[NAMEMAXLEN];
double charge;
int res, rel;
int del;
} topo_defs_atom_t;
typedef struct topo_defs_bond_t {
struct topo_defs_bond_t *next;
char atom1[NAMEMAXLEN];
char atom2[NAMEMAXLEN];
int res1, rel1;
int res2, rel2;
int del;
} topo_defs_bond_t;
typedef struct topo_defs_angle_t {
struct topo_defs_angle_t *next;
char atom1[NAMEMAXLEN];
char atom2[NAMEMAXLEN];
char atom3[NAMEMAXLEN];
int res1, rel1;
int res2, rel2;
int res3, rel3;
int del;
} topo_defs_angle_t;
typedef struct topo_defs_dihedral_t {
struct topo_defs_dihedral_t *next;
char atom1[NAMEMAXLEN];
char atom2[NAMEMAXLEN];
char atom3[NAMEMAXLEN];
char atom4[NAMEMAXLEN];
int res1, rel1;
int res2, rel2;
int res3, rel3;
int res4, rel4;
int del;
} topo_defs_dihedral_t;
typedef struct topo_defs_improper_t {
struct topo_defs_improper_t *next;
char atom1[NAMEMAXLEN];
char atom2[NAMEMAXLEN];
char atom3[NAMEMAXLEN];
char atom4[NAMEMAXLEN];
int res1, rel1;
int res2, rel2;
int res3, rel3;
int res4, rel4;
int del;
} topo_defs_improper_t;
typedef struct topo_defs_cmap_t {
struct topo_defs_cmap_t *next;
char atoml[8][NAMEMAXLEN];
int resl[8], rell[8];
int del;
} topo_defs_cmap_t;
typedef struct topo_defs_conformation_t {
struct topo_defs_conformation_t *next;
char atom1[NAMEMAXLEN];
char atom2[NAMEMAXLEN];
char atom3[NAMEMAXLEN];
char atom4[NAMEMAXLEN];
int res1, rel1;
int res2, rel2;
int res3, rel3;
int res4, rel4;
int del;
int improper;
double dist12, angle123, dihedral, angle234, dist34;
} topo_defs_conformation_t;
typedef struct topo_defs_residue_t {
char name[NAMEMAXLEN];
int patch;
topo_defs_atom_t *atoms;
topo_defs_bond_t *bonds;
topo_defs_angle_t *angles;
topo_defs_dihedral_t *dihedrals;
topo_defs_improper_t *impropers;
topo_defs_cmap_t *cmaps;
topo_defs_conformation_t *conformations;
char pfirst[NAMEMAXLEN];
char plast[NAMEMAXLEN];
} topo_defs_residue_t;
typedef struct topo_defs_topofile_t {
/* struct topo_defs_topofile_t *next; */
char filename[256];
} topo_defs_topofile_t;
struct topo_defs {
void *newerror_handler_data;
void (*newerror_handler)(void *, const char *);
int auto_angles;
int auto_dihedrals;
int cmaps_present;
char pfirst[NAMEMAXLEN];
char plast[NAMEMAXLEN];
topo_defs_topofile_t *topo_array;
hasharray *topo_hash;
topo_defs_type_t *type_array;
hasharray *type_hash;
topo_defs_residue_t *residue_array;
hasharray *residue_hash;
topo_defs_residue_t *buildres;
int buildres_no_errors;
memarena *arena;
};
#endif