forked from adavtyan/awsemmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix_qbias.h
94 lines (72 loc) · 1.94 KB
/
fix_qbias.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
/* ----------------------------------------------------------------------
Copyright (2010) Aram Davtyan and Garegin Papoian
Papoian's Group, University of Maryland at Collage Park
http://papoian.chem.umd.edu/
Last Update: 12/01/2010
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
FixStyle(qbias,FixQBias)
#else
#ifndef LMP_FIX_QBIAS_H
#define LMP_FIX_QBIAS_H
#include "fix.h"
//#include "smart_matrix_lib.h"
namespace LAMMPS_NS {
class FixQBias : public Fix {
public:
FixQBias(class LAMMPS *, int, char **);
~FixQBias();
int setmask();
void init();
void setup(int);
void min_setup(int);
void post_force(int);
void post_force_respa(int, int, int);
void min_post_force(int);
double compute_scalar();
double compute_vector(int);
private:
double epsilon;
double k_qbias;
int force_flag;
int nlevels_respa;
bool allocated;
int ntimestep;
int n, nn;
int *alpha_carbons;
bool qbias_flag, qbias_exp_flag, qobias_flag, qobias_exp_flag;
double q0, sigma, sigma_exp;
double cutoff, min_sep;
double *sigma_sq;
int l;
double **rN, **r, **q;
int *res_no, *res_info, *chain_no;
double **x, **f;
double **xca;
int *image;
double prd[3], half_prd[3];
int *periodicity;
enum ResInfo{NONE=0, LOCAL, GHOST, OFF};
double energy[5], energy_all[5];
enum EnergyTerms{ET_TOTAL=0, ET_QBIAS, nEnergyTerms};
private:
void compute();
void compute_qbias();
double Sigma(int sep);
void allocate();
int Tag(int index);
inline void Construct_Computational_Arrays();
inline double PeriodicityCorrection(double d, int i);
inline bool isFirst(int index);
inline bool isLast(int index);
inline void print_log(char *line);
int Step;
int sStep, eStep;
FILE *fout;
FILE *efile;
void out_xyz_and_force(int coord=0);
class AtomVecAWSEM *avec;
};
}
#endif
#endif