there is no need to using tagints in molecule templates
This commit is contained in:
@ -839,7 +839,7 @@ void Molecule::molecules(char *line)
|
||||
if (iatom < 0 || iatom >= natoms)
|
||||
error->all(FLERR, "Invalid atom index in Molecules section of molecule file");
|
||||
count[iatom]++;
|
||||
molecule[iatom] = values.next_tagint();
|
||||
molecule[iatom] = values.next_int();
|
||||
// molecule[iatom] += moffset; // placeholder for possible molecule offset
|
||||
}
|
||||
} catch (TokenizerException &e) {
|
||||
@ -1045,7 +1045,7 @@ void Molecule::bonds(int flag, char *line)
|
||||
{
|
||||
const std::string location = "Bonds section of molecule file";
|
||||
int itype;
|
||||
tagint m, atom1, atom2;
|
||||
int m, atom1, atom2;
|
||||
std::string typestr;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
@ -1131,7 +1131,7 @@ void Molecule::angles(int flag, char *line)
|
||||
{
|
||||
const std::string location = "Angles section of molecule file";
|
||||
int itype;
|
||||
tagint m, atom1, atom2, atom3;
|
||||
int m, atom1, atom2, atom3;
|
||||
std::string typestr;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
@ -1232,7 +1232,7 @@ void Molecule::dihedrals(int flag, char *line)
|
||||
{
|
||||
const std::string location = "Dihedrals section of molecule file";
|
||||
int itype;
|
||||
tagint m, atom1, atom2, atom3, atom4;
|
||||
int m, atom1, atom2, atom3, atom4;
|
||||
std::string typestr;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
@ -1347,7 +1347,7 @@ void Molecule::impropers(int flag, char *line)
|
||||
{
|
||||
const std::string location = "Impropers section of molecule file";
|
||||
int itype;
|
||||
tagint m, atom1, atom2, atom3, atom4;
|
||||
int m, atom1, atom2, atom3, atom4;
|
||||
std::string typestr;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
@ -1544,13 +1544,13 @@ void Molecule::special_read(char *line)
|
||||
void Molecule::special_generate()
|
||||
{
|
||||
int newton_bond = force->newton_bond;
|
||||
tagint atom1, atom2;
|
||||
int atom1, atom2;
|
||||
|
||||
// temporary array for special atoms
|
||||
|
||||
tagint **tmpspecial;
|
||||
int **tmpspecial;
|
||||
memory->create(tmpspecial, natoms, atom->maxspecial, "molecule:tmpspecial");
|
||||
memset(&tmpspecial[0][0], 0, sizeof(tagint) * natoms * atom->maxspecial);
|
||||
memset(&tmpspecial[0][0], 0, sizeof(int) * natoms * atom->maxspecial);
|
||||
|
||||
for (int i = 0; i < natoms; i++) count[i] = 0;
|
||||
|
||||
@ -1694,30 +1694,30 @@ void Molecule::shakeatom_read(char *line)
|
||||
|
||||
switch (shake_flag[iatom]) {
|
||||
case 1:
|
||||
shake_atom[iatom][0] = values.next_tagint();
|
||||
shake_atom[iatom][1] = values.next_tagint();
|
||||
shake_atom[iatom][2] = values.next_tagint();
|
||||
shake_atom[iatom][0] = values.next_int();
|
||||
shake_atom[iatom][1] = values.next_int();
|
||||
shake_atom[iatom][2] = values.next_int();
|
||||
nwant = 4;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
shake_atom[iatom][0] = values.next_tagint();
|
||||
shake_atom[iatom][1] = values.next_tagint();
|
||||
shake_atom[iatom][0] = values.next_int();
|
||||
shake_atom[iatom][1] = values.next_int();
|
||||
nwant = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
shake_atom[iatom][0] = values.next_tagint();
|
||||
shake_atom[iatom][1] = values.next_tagint();
|
||||
shake_atom[iatom][2] = values.next_tagint();
|
||||
shake_atom[iatom][0] = values.next_int();
|
||||
shake_atom[iatom][1] = values.next_int();
|
||||
shake_atom[iatom][2] = values.next_int();
|
||||
nwant = 4;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
shake_atom[iatom][0] = values.next_tagint();
|
||||
shake_atom[iatom][1] = values.next_tagint();
|
||||
shake_atom[iatom][2] = values.next_tagint();
|
||||
shake_atom[iatom][3] = values.next_tagint();
|
||||
shake_atom[iatom][0] = values.next_int();
|
||||
shake_atom[iatom][1] = values.next_int();
|
||||
shake_atom[iatom][2] = values.next_int();
|
||||
shake_atom[iatom][3] = values.next_int();
|
||||
nwant = 5;
|
||||
break;
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ class Molecule : protected Pointers {
|
||||
|
||||
double **x; // displacement of each atom from origin
|
||||
int *type; // type of each atom
|
||||
tagint *molecule; // molecule of each atom
|
||||
int *molecule; // molecule-id of each atom
|
||||
double *q; // charge on each atom
|
||||
double *radius; // radius of each atom
|
||||
double *rmass; // mass of each atom
|
||||
@ -69,25 +69,25 @@ class Molecule : protected Pointers {
|
||||
|
||||
int *num_bond; // bonds, angles, dihedrals, impropers for each atom
|
||||
int **bond_type;
|
||||
tagint **bond_atom;
|
||||
int **bond_atom;
|
||||
|
||||
int *num_angle;
|
||||
int **angle_type;
|
||||
tagint **angle_atom1, **angle_atom2, **angle_atom3;
|
||||
int **angle_atom1, **angle_atom2, **angle_atom3;
|
||||
|
||||
int *num_dihedral;
|
||||
int **dihedral_type;
|
||||
tagint **dihedral_atom1, **dihedral_atom2, **dihedral_atom3, **dihedral_atom4;
|
||||
int **dihedral_atom1, **dihedral_atom2, **dihedral_atom3, **dihedral_atom4;
|
||||
|
||||
int *num_improper;
|
||||
int **improper_type;
|
||||
tagint **improper_atom1, **improper_atom2, **improper_atom3, **improper_atom4;
|
||||
int **improper_atom1, **improper_atom2, **improper_atom3, **improper_atom4;
|
||||
|
||||
int **nspecial;
|
||||
tagint **special;
|
||||
int **special;
|
||||
|
||||
int *shake_flag;
|
||||
tagint **shake_atom;
|
||||
int **shake_atom;
|
||||
int **shake_type;
|
||||
|
||||
class AtomVecBody *avec_body;
|
||||
|
||||
Reference in New Issue
Block a user