-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcompute_rdf_ext.h
109 lines (87 loc) · 2.97 KB
/
compute_rdf_ext.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
/* ----------------------------------------------------------------------
compute rdf/ext is a child class of "compute", developed based on two
classes of "compute msd" and "compute rdf", provided by LAMMPS.
This command is distributed under the GNU General Public License.
------------------------------------------------------------------------- */
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, 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 COMPUTE_CLASS
ComputeStyle(rdf/ext,ComputeRDFExtend)
#else
#ifndef LMP_COMPUTE_RDF__Extend_H
#define LMP_COMPUTE_RDF__Extend_H
#include "compute.h"
namespace LAMMPS_NS {
class ComputeRDFExtend : public Compute {
public:
ComputeRDFExtend(class LAMMPS *, int, char **);
virtual ~ComputeRDFExtend();
void init();
virtual double compute_scalar(); // remember what this returns
protected:
#define MAXGROUPS 32
#define SQR(x) ((x)*(x))
#define CUBE(x) ((x)*(x)*(x))
// The parameters related to MPI and gathering the positions
int me; // This is for the definition of rank of processor in LAMMPS
int nprocs; // This is for the number of processors
int *tmprecvcnts; // Number of atoms per each processor [array]
int *recvcnts; // Number of atoms per each processor [array]
int *displs; // Displacement array for receiving the correct data set from each processor [array]
double *sendbuff;
double *recvbuff;
// New static arrays or dynamic arrays
double **TmpPos;
int **Groups;
// RDF
int binsize;
double r, r2, sf, pairs;
double rin , rout, vin, vout;
int whichbin;
double NumberOfParticles;
double ***Gg;
double ***Gglocal;
double boxsize;
double maxdist;
double hBox;
double Delta;
double Delta_1;
double Cube_deltaboxsize;
double Sqr_deltaboxsize;
double Ggt;
double dr[3];
// RDF Correction
double ***PartSum;
double SphereVolFrac;
double gr_correction;
// The things in common with the other one
double timeinterval;
int count ;
int WriteFileEvery;
FILE *FilePtr; // The file handle for writing the calculated RDF
int samplerate;
int realatom;
char *filename; // filename
// Finding corresponding groups to each atom
int tmpgroup[MAXGROUPS][3]; // group_id ; groupbits ; number_of_particles
int tmpnumgroup ;
int tmpfoundgroup ;
int groupatom1, groupatom2;
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: Illegal ... command
Self-explanatory.
E: Not a cubic simulation box for rdf/ext
Self-explanatory.
*/