git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11908 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-05-02 22:15:13 +00:00
parent 8bee4ef596
commit 3b7123bec2
3 changed files with 28 additions and 26 deletions

View File

@ -230,9 +230,7 @@ void DihedralClass2::compute(int eflag, int vflag)
sinphi = sqrt(1.0 - c*c); sinphi = sqrt(1.0 - c*c);
sinphi = MAX(sinphi,SMALL); sinphi = MAX(sinphi,SMALL);
// addition by Andrew Jewett, Jan 2013 // n123 = vb1 x vb2
// adjust the sign of phi if necessary for negative input angles
// n123 = vb2 x vb1
double n123x = vb1y*vb2z - vb1z*vb2y; double n123x = vb1y*vb2z - vb1z*vb2y;
double n123y = vb1z*vb2x - vb1x*vb2z; double n123y = vb1z*vb2x - vb1x*vb2z;

View File

@ -859,20 +859,20 @@ void Neighbor::init()
// set ptrs to topology build functions // set ptrs to topology build functions
if (bond_off) bond_build = &Neighbor::bond_partial; if (atom->molecular == 2) bond_build = &Neighbor::bond_template;
else if (atom->molecular == 2) bond_build = &Neighbor::bond_template; else if (bond_off) bond_build = &Neighbor::bond_partial;
else bond_build = &Neighbor::bond_all; else bond_build = &Neighbor::bond_all;
if (angle_off) angle_build = &Neighbor::angle_partial; if (atom->molecular == 2) angle_build = &Neighbor::angle_template;
else if (atom->molecular == 2) angle_build = &Neighbor::angle_template; else if (angle_off) angle_build = &Neighbor::angle_partial;
else angle_build = &Neighbor::angle_all; else angle_build = &Neighbor::angle_all;
if (dihedral_off) dihedral_build = &Neighbor::dihedral_partial; if (atom->molecular == 2) dihedral_build = &Neighbor::dihedral_template;
else if (atom->molecular == 2) dihedral_build = &Neighbor::dihedral_template; else if (dihedral_off) dihedral_build = &Neighbor::dihedral_partial;
else dihedral_build = &Neighbor::dihedral_all; else dihedral_build = &Neighbor::dihedral_all;
if (improper_off) improper_build = &Neighbor::improper_partial; if (atom->molecular == 2) improper_build = &Neighbor::improper_template;
else if (atom->molecular == 2) improper_build = &Neighbor::improper_template; else if (improper_off) improper_build = &Neighbor::improper_partial;
else improper_build = &Neighbor::improper_all; else improper_build = &Neighbor::improper_all;
// set topology neighbor list counts to 0 // set topology neighbor list counts to 0

View File

@ -218,6 +218,9 @@ void WriteData::header()
fprintf(fp,BIGINT_FORMAT " atoms\n",atom->natoms); fprintf(fp,BIGINT_FORMAT " atoms\n",atom->natoms);
fprintf(fp,"%d atom types\n",atom->ntypes); fprintf(fp,"%d atom types\n",atom->ntypes);
// do not write molecular topology info for atom_style template
if (atom->molecular == 1) {
if (atom->nbonds || atom->nbondtypes) { if (atom->nbonds || atom->nbondtypes) {
fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds); fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds);
fprintf(fp,"%d bond types\n",atom->nbondtypes); fprintf(fp,"%d bond types\n",atom->nbondtypes);
@ -234,6 +237,7 @@ void WriteData::header()
fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers); fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers);
fprintf(fp,"%d improper types\n",atom->nimpropertypes); fprintf(fp,"%d improper types\n",atom->nimpropertypes);
} }
}
for (int i = 0; i < modify->nfix; i++) for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->wd_header) if (modify->fix[i]->wd_header)