rearrange pointer variables to a more logical location, quell compiler warning and initialize all pointer
This commit is contained in:
@ -45,8 +45,8 @@ Molecule::Molecule(LAMMPS *lmp, int narg, char **arg, int &index) :
|
|||||||
improper_type(NULL), improper_atom1(NULL), improper_atom2(NULL),
|
improper_type(NULL), improper_atom1(NULL), improper_atom2(NULL),
|
||||||
improper_atom3(NULL), improper_atom4(NULL), nspecial(NULL), special(NULL),
|
improper_atom3(NULL), improper_atom4(NULL), nspecial(NULL), special(NULL),
|
||||||
shake_flag(NULL), shake_atom(NULL), shake_type(NULL), avec_body(NULL), ibodyparams(NULL),
|
shake_flag(NULL), shake_atom(NULL), shake_type(NULL), avec_body(NULL), ibodyparams(NULL),
|
||||||
dbodyparams(NULL), dx(NULL), dxcom(NULL), dxbody(NULL), quat_external(NULL),
|
dbodyparams(NULL), fragmentmask(NULL), fragmentnames(NULL),
|
||||||
fp(NULL), count(NULL), fragmentmask(NULL)
|
dx(NULL), dxcom(NULL), dxbody(NULL), quat_external(NULL), fp(NULL), count(NULL)
|
||||||
{
|
{
|
||||||
me = comm->me;
|
me = comm->me;
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,6 @@ class Molecule : protected Pointers {
|
|||||||
int nbondtypes,nangletypes,ndihedraltypes,nimpropertypes;
|
int nbondtypes,nangletypes,ndihedraltypes,nimpropertypes;
|
||||||
int nibody,ndbody;
|
int nibody,ndbody;
|
||||||
|
|
||||||
// fragment info
|
|
||||||
char **fragmentnames;
|
|
||||||
int **fragmentmask; // nfragments by natoms
|
|
||||||
|
|
||||||
// max bond,angle,etc per atom
|
// max bond,angle,etc per atom
|
||||||
|
|
||||||
int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom;
|
int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom;
|
||||||
@ -95,6 +91,11 @@ class Molecule : protected Pointers {
|
|||||||
int *ibodyparams; // integer and double body params
|
int *ibodyparams; // integer and double body params
|
||||||
double *dbodyparams;
|
double *dbodyparams;
|
||||||
|
|
||||||
|
// fragment info
|
||||||
|
|
||||||
|
int **fragmentmask; // nfragments by natoms
|
||||||
|
char **fragmentnames;
|
||||||
|
|
||||||
double center[3]; // geometric center of molecule
|
double center[3]; // geometric center of molecule
|
||||||
double masstotal; // total mass of molecule
|
double masstotal; // total mass of molecule
|
||||||
double com[3]; // center of mass of molecule
|
double com[3]; // center of mass of molecule
|
||||||
|
|||||||
Reference in New Issue
Block a user