-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.h
More file actions
45 lines (37 loc) · 784 Bytes
/
global.h
File metadata and controls
45 lines (37 loc) · 784 Bytes
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
/*conformation.h*/
#ifndef GLOBAL_H
#define GLOBAL_H
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define pi 3.14159265358979
#define kB 1.3806505E-23 //Boltzmann constant,m^2*kg*s^-2*K^-1
#define Avogadro 6.02E23 //Avogadro constant
//define struct bead,x,y,z is cord,rad is radii.
typedef struct {
double x,y,z,r;
}bead ;
typedef struct {
/*neighborhood beads index.*/
int start;
int end;
double len;
} spring;
typedef struct {
/*neighborhood springs index.*/
int start;
int end;
double angle;
} ang;
typedef struct {
int nbd;
int nsp;
int nang;
bead *beads;
spring *springs;
ang *angs;
} confor;
extern confor *confor_get(int nbd,int nsp,int nang);
extern void confor_free(confor *p);
extern void confor_copy(confor *from,confor *to);
#endif