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 = MAX(sinphi,SMALL);
// addition by Andrew Jewett, Jan 2013
// adjust the sign of phi if necessary for negative input angles
// n123 = vb2 x vb1
// n123 = vb1 x vb2
double n123x = vb1y*vb2z - vb1z*vb2y;
double n123y = vb1z*vb2x - vb1x*vb2z;

View File

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

View File

@ -218,21 +218,25 @@ void WriteData::header()
fprintf(fp,BIGINT_FORMAT " atoms\n",atom->natoms);
fprintf(fp,"%d atom types\n",atom->ntypes);
if (atom->nbonds || atom->nbondtypes) {
fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds);
fprintf(fp,"%d bond types\n",atom->nbondtypes);
}
if (atom->nangles || atom->nangletypes) {
fprintf(fp,BIGINT_FORMAT " angles\n",nangles);
fprintf(fp,"%d angle types\n",atom->nangletypes);
}
if (atom->ndihedrals || atom->ndihedraltypes) {
fprintf(fp,BIGINT_FORMAT " dihedrals\n",atom->ndihedrals);
fprintf(fp,"%d dihedral types\n",atom->ndihedraltypes);
}
if (atom->nimpropers || atom->nimpropertypes) {
fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers);
fprintf(fp,"%d improper types\n",atom->nimpropertypes);
// do not write molecular topology info for atom_style template
if (atom->molecular == 1) {
if (atom->nbonds || atom->nbondtypes) {
fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds);
fprintf(fp,"%d bond types\n",atom->nbondtypes);
}
if (atom->nangles || atom->nangletypes) {
fprintf(fp,BIGINT_FORMAT " angles\n",nangles);
fprintf(fp,"%d angle types\n",atom->nangletypes);
}
if (atom->ndihedrals || atom->ndihedraltypes) {
fprintf(fp,BIGINT_FORMAT " dihedrals\n",atom->ndihedrals);
fprintf(fp,"%d dihedral types\n",atom->ndihedraltypes);
}
if (atom->nimpropers || atom->nimpropertypes) {
fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers);
fprintf(fp,"%d improper types\n",atom->nimpropertypes);
}
}
for (int i = 0; i < modify->nfix; i++)