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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429
|
/*****
This file is part of the Babel Program
Copyright (C) 1992-96 W. Patrick Walters and Matthew T. Stahl
All Rights Reserved
For more information please contact :
babel@mercury.aichem.arizona.edu
--------------------------------------------------------------------------------
FILE : bbl_types.h
AUTHOR(S) : Pat Walters
DATE : Constantly evolving
******/
#ifndef __BABEL_BBLTYP_H__
#define __BABEL_BBLTYP_H__
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include "bblmacs.h"
enum file_type {
none, mopac_cartesian, mopac_internal, mopac_output, macromodel,
mm2_output, pdb, csd_gstat, xyz, chemdraw,
idatm, mm2_input, alchemy, csd_cssr, free_fract,
mac_molecule, report, amber_prep, molin, boogie,
caccrt, ball_and_stick, chem3d1, chem3d2, micro_world,
molfile, gamess_output, gamess_input, mmads, diagnostics,
shelx, csd_fdat, charmm, gaussian_output,
gaussian_input, gaussian_cart, hyperchem_hin, biosym_car, cadpac,
cache_out, mm3, sybyl_mol, sybyl_mol2, spartan, quanta, molgen, wizard,
feature, pcmodel, spart_semi, cacao_int, fenske_zmat,spart_mm,
gaussian_template,bmin_com, conjure_tmplt, icon8, maccs, maccs2d,
maccs3d, xed, unixyz, isis, dock, dock_pdb, bgf, m3d,
psgvb_input, psgvb_output, psgvb_cart, psgvb_zmat,
csr, smiles, gaussian_94, torlist, schakal, mol_inventor,
gr96A,gr96N, tinker,box, viewmol
};
enum op_type {noaction, input, output};
enum type_err {zero, dummy, all_caps};
typedef struct
{
enum file_type type;
char *type_name;
char *code;
enum op_type operation;
#ifdef __cplusplus
int (*func)(FILE *fp,struct ums *mol);
#else
int (*func)();
#endif
} babel_rec;
typedef char char3[3];
typedef struct
{
int a,b,c,d;
} torsion_rec;
typedef struct
{
int a,b,c;
} angle_rec;
typedef struct
{
int setlen;
int *set;
} set_type;
typedef struct
{
int number;
char name[3];
double cov_rad;
double bond_ord_rad;
double vdw_rad;
double bs_rad;
int max_bonds;
int color;
double red;
double green;
double blue;
} element_type;
typedef struct
{
double x,y,z;
} coord_type;
typedef struct
{
coord_type point;
char type[5];
int max_bonds;
int valence;
int atomic_number;
int connected_atoms[MAX_CONNECTIONS];
int bond_order[MAX_CONNECTIONS];
double radius;
double bond_ord_rad;
double dble;
int organic;
int redo;
int pos[3];
double charge;
set_type *atm_set;
} atom_type;
typedef struct
{
int start;
int end;
int bond_order;
} connect_type;
typedef struct
{
double r;
double w;
double t;
/* int n; */
int na;
int nb;
int nc;
} int_type;
typedef struct
{
char default_extension[BUFF_SIZE];
char base_name[BUFF_SIZE];
char infile_name[BUFF_SIZE];
char outfile_name[BUFF_SIZE];
char input_keywords[BUFF_SIZE];
char output_keywords[BUFF_SIZE];
char del_str[BUFF_SIZE];
babel_rec input_info;
babel_rec output_info;
int verbose;
int use_menus;
int do_add_hydrogens;
int do_delete_atoms;
int the_size;
int multi;
int lower_limit;
int upper_limit;
int spline;
int increment;
int renum;
int new_base;
int center;
int align;
int precipitate;
int new_file;
int calc_charges;
int orient;
int no_dummy;
int push_hydrogens;
} bbl_control;
/*---------- structures for ring detection --- */
typedef struct
{
int level;
int ancestor;
} spanning_tree;
typedef struct
{
int length;
int bogus;
set_type *path_set;
int *path_atoms;
int closure;
int found;
} path;
typedef struct
{
int count;
path *ring_list;
} ring_struct;
typedef struct
{
int num;
set_type *ring_atms;
set_type *arom_atms;
set_type *arom_rings;
set_type **rings;
} ring_info;
/*--------------------------------------------*/
/*************
HUGEPTR as defined in the struct below is a maco
which defines HUGEPTR as the keyword huge when #define MSDOS
is present or as nothing when #define MSDOS is absent. This is
necessary because of the lovely method Intel uses to segment memory.
The macros are defined in bblmacs.h
PW - 072094
****************/
typedef struct
{
double A,B,C;
double Alpha,Beta,Gamma;
} fract_type;
typedef struct
{
int serial_num;
int chain_num;
int res_num;
char res_type[6];
char atm_type[6];
} res_list;
struct ums
{
bbl_control *control;
ring_struct *rings;
ring_info *ring_info;
char default_extension[20];
int num_atoms;
int num_bonds;
int num_connections_initialized;
int num_residues_initialized;
int num_internal_initialized;
char title[BUFF_SIZE];
double energy;
res_list HUGEPTR *residues;
atom_type HUGEPTR *atoms;
connect_type HUGEPTR *connections;
int_type HUGEPTR *internal;
fract_type HUGEPTR *fract;
struct ums *next;
};
typedef struct ums ums_type;
/* structs for miniums functions */
struct mini_ums_type
{
int num_atoms;
double energy;
coord_type *atoms;
struct mini_ums_type *next;
};
typedef struct mini_ums_type mini_ums;
typedef struct
{
int atom_number;
int heavy_atoms;
} heavy_rec;
typedef struct
{
char name[8];
int number;
} pdb_type_rec;
typedef struct
{
char *text;
enum file_type type;
int keywords_required;
} menu_type;
typedef struct
{
double x,y,z;
} vect_type;
typedef struct
{
double a1, b1, c1;
double a2, b2, c2;
double a3, b3, c3;
} matrix_3x3;
typedef struct
{
double x;
double y;
double z;
int num;
double dist;
} temp_atom_rec;
typedef char warning[80];
typedef struct
{
char sym[10];
double val;
} zsymbol;
typedef struct
{
int level;
int ancestor;
int kids;
int kid[MAX_CONNECTIONS];
} z_tree;
/* structure and macros for set operations */
#define SETWORD 32 /* platform dependant - should == sizeof(int) */
#define LowBit(set, bit)\
{register int m;\
if (set != 0)\
{\
bit = 31;\
if (set != 0x80000000) {\
if (m = (set & 0x0000ffff)) {set = m; bit -= 16;}\
if (m = (set & 0x00ff00ff)) {set = m; bit -= 8;}\
if (m = (set & 0x0f0f0f0f)) {set = m; bit -= 4;}\
if (m = (set & 0x33333333)) {set = m; bit -= 2;}\
if (m = (set & 0x55555555)) {set = m; bit -= 1;}}}\
else bit = -1;}
static int bitsoff[SETWORD] =
{
0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFC,0xFFFFFFF8,0xFFFFFFF0,0xFFFFFFE0,0xFFFFFFC0,
0xFFFFFF80,0xFFFFFF00,0xFFFFFE00,0xFFFFFC00,0xFFFFF800,0xFFFFF000,0xFFFFE000,
0xFFFFC000,0xFFFF8000,0xFFFF0000,0xFFFE0000,0xFFFC0000,0xFFF80000,0xFFF00000,
0xFFE00000,0xFFC00000,0xFF800000,0xFF000000,0xFE000000,0xFC000000,0xF8000000,
0xF0000000,0xE0000000,0xC0000000,0x80000000
};
#define biton(seta,member) seta->set[(member / SETWORD)] |= \
(1 << (member % SETWORD));
#define bitoff(seta,member) seta->set[(member / SETWORD)] &= \
(~(1 << (member % SETWORD)));
#define bit_is_on(seta,member) (seta->set[(member/SETWORD)]>>\
(member % SETWORD)&1)
enum coord_state {linear, trigonal, tetrahedral, octahedral};
typedef struct
{
int ptr;
int *bond;
int *choice;
} bnd_stack;
typedef struct
{
double is,id,it,wsd,wdt;
} bnd_info;
typedef struct
{
char atm_typ[3];
double a,b,c,d;
} gast_param;
/*----------------------------------------------------
Data structures for Simon Kilvington's SMILES routines
-----------------------------------------------------*/
typedef void *block_ptr;
/* smiles connection table data */
#define md_MAXBONDS 8 /* max atoms that an atom can be bonded to */
#define md_NOBOND -1 /* used in bondedto[] arrays */
typedef char smilesbond_t;
#define SMILESBOND_NoBond ((smilesbond_t) 0)
#define SMILESBOND_Single ((smilesbond_t) 1)
#define SMILESBOND_Double ((smilesbond_t) 2)
#define SMILESBOND_Triple ((smilesbond_t) 3)
#define SMILESBOND_Aromatic ((smilesbond_t) 5)
typedef struct
{
char symbol[2];
int bondedto[md_MAXBONDS]; /* indices of atoms this one is bonded to */
smilesbond_t bondtype[md_MAXBONDS];
} smilesatom_t;
typedef struct
{
int natoms;
smilesatom_t atom[1]; /* array extends to atom[natoms-1] */
} smilescontab_t;
#define smiles_CONTABHDRSIZE (sizeof(smilescontab_t) - sizeof(smilesatom_t))
/*-------------------------------------------------------------------------------------*/
#include "babel.h"
#endif /* !__BABEL_BBLTYP_H__ */
|