forked from lijiext/lammps
Enabled triclinic cells
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14678 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
b5e95a0a14
commit
737c083a4f
|
@ -645,8 +645,8 @@ void FixGCMC::pre_exchange()
|
|||
if (random_equal->uniform() < 0.5) attempt_molecule_translation_full();
|
||||
else attempt_molecule_rotation_full();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_deletion_full();
|
||||
else attempt_molecule_insertion_full();
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_deletion_full();
|
||||
else attempt_molecule_insertion_full();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -656,8 +656,8 @@ void FixGCMC::pre_exchange()
|
|||
if (random_int_fraction <= nmcmoves) {
|
||||
attempt_atomic_translation_full();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_atomic_deletion_full();
|
||||
else attempt_atomic_insertion_full();
|
||||
if (random_equal->uniform() < 0.5) attempt_atomic_deletion_full();
|
||||
else attempt_atomic_insertion_full();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ void FixGCMC::pre_exchange()
|
|||
else attempt_molecule_rotation();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_deletion();
|
||||
else attempt_molecule_insertion();
|
||||
else attempt_molecule_insertion();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -689,8 +689,8 @@ void FixGCMC::pre_exchange()
|
|||
if (random_int_fraction <= nmcmoves) {
|
||||
attempt_atomic_translation();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_atomic_deletion();
|
||||
else attempt_atomic_insertion();
|
||||
if (random_equal->uniform() < 0.5) attempt_atomic_deletion();
|
||||
else attempt_atomic_insertion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -799,7 +799,9 @@ void FixGCMC::attempt_atomic_deletion()
|
|||
if (atom->map_style) atom->map_init();
|
||||
}
|
||||
atom->nghost = 0;
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
update_gas_atoms_list();
|
||||
ndeletion_successes += 1.0;
|
||||
}
|
||||
|
@ -906,7 +908,9 @@ void FixGCMC::attempt_atomic_insertion()
|
|||
if (atom->map_style) atom->map_init();
|
||||
}
|
||||
atom->nghost = 0;
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
update_gas_atoms_list();
|
||||
ninsertion_successes += 1.0;
|
||||
}
|
||||
|
@ -1132,7 +1136,9 @@ void FixGCMC::attempt_molecule_deletion()
|
|||
atom->natoms -= natoms_per_molecule;
|
||||
if (atom->map_style) atom->map_init();
|
||||
atom->nghost = 0;
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
update_gas_atoms_list();
|
||||
ndeletion_successes += 1.0;
|
||||
}
|
||||
|
@ -1315,7 +1321,9 @@ void FixGCMC::attempt_molecule_insertion()
|
|||
atom->nimpropers += onemols[imol]->nimpropers;
|
||||
if (atom->map_style) atom->map_init();
|
||||
atom->nghost = 0;
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
update_gas_atoms_list();
|
||||
ninsertion_successes += 1.0;
|
||||
}
|
||||
|
@ -1541,7 +1549,9 @@ void FixGCMC::attempt_atomic_insertion_full()
|
|||
if (atom->map_style) atom->map_init();
|
||||
}
|
||||
atom->nghost = 0;
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
if (force->kspace) force->kspace->qsum_qsq();
|
||||
double energy_after = energy_full();
|
||||
|
||||
|
@ -1964,7 +1974,9 @@ void FixGCMC::attempt_molecule_insertion_full()
|
|||
atom->nimpropers += onemols[imol]->nimpropers;
|
||||
if (atom->map_style) atom->map_init();
|
||||
atom->nghost = 0;
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
if (force->kspace) force->kspace->qsum_qsq();
|
||||
double energy_after = energy_full();
|
||||
|
||||
|
|
Loading…
Reference in New Issue