forked from lammps/lammps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfix_pimd.h
114 lines (83 loc) · 2.69 KB
/
fix_pimd.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
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, [email protected]
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
// clang-format off
FixStyle(pimd,FixPIMD);
// clang-format on
#else
#ifndef FIX_PIMD_H
#define FIX_PIMD_H
#include "fix.h"
namespace LAMMPS_NS {
class FixPIMD : public Fix {
public:
FixPIMD(class LAMMPS *, int, char **);
int setmask();
void init();
void setup(int);
void post_force(int);
void initial_integrate(int);
void final_integrate();
double memory_usage();
void grow_arrays(int);
void copy_arrays(int, int, int);
int pack_exchange(int, double *);
int unpack_exchange(int, double *);
int pack_restart(int, double *);
void unpack_restart(int, int);
int maxsize_restart();
int size_restart(int);
double compute_vector(int);
int pack_forward_comm(int, int *, double *, int, int *);
void unpack_forward_comm(int, int, double *);
int method;
int np;
double inverse_np;
/* ring-polymer model */
double omega_np, fbond, spring_energy, sp;
int x_last, x_next;
void spring_force();
/* fictitious mass */
double fmass, *mass;
/* inter-partition communication */
int max_nsend;
tagint *tag_send;
double *buf_send;
int max_nlocal;
double *buf_recv, **buf_beads;
int size_plan;
int *plan_send, *plan_recv;
double **comm_ptr;
void comm_init();
void comm_exec(double **);
/* normal-mode operations */
double *lam, **M_x2xp, **M_xp2x, **M_f2fp, **M_fp2f;
int *mode_index;
void nmpimd_init();
void nmpimd_fill(double **);
void nmpimd_transform(double **, double **, double *);
/* Nose-hoover chain integration */
int nhc_offset_one_1, nhc_offset_one_2;
int nhc_size_one_1, nhc_size_one_2;
int nhc_nchain;
bool nhc_ready;
double nhc_temp, dtv, dtf, t_sys;
double **nhc_eta; /* coordinates of NH chains for ring-polymer beads */
double **nhc_eta_dot; /* velocities of NH chains */
double **nhc_eta_dotdot; /* acceleration of NH chains */
double **nhc_eta_mass; /* mass of NH chains */
void nhc_init();
void nhc_update_v();
void nhc_update_x();
};
} // namespace LAMMPS_NS
#endif
#endif