Updated doc (use of overlap clarified)

This commit is contained in:
Eugen Rožić
2022-04-26 11:55:24 +02:00
parent 811e5786fe
commit 72011bf325
2 changed files with 11 additions and 4 deletions

View File

@ -314,6 +314,16 @@ radius is taken into account so that all new molecules will be created
at locations not closer than (*radius* + molecule radius) from the location
of any existing atom in the system.
.. note::
Checking for overlaps is a very costly operation (O(N) for each new atom/molecule,
where N is the number of existing atoms) and the intended use of this keyword is,
for example, adding small amounts of new atoms/molecules to relatively sparse systems
mid simulation (between consecutive runs), i.e. where running an energy minimization
procedure isn't an option.
In any case, the use of the *maxtries* keyword in combination with *overlap* is
highly recommended.
The *units* keyword determines the meaning of the distance units used
to specify the coordinates of the one particle created by the *single*
style. A *box* value selects standard distance units as defined by

View File

@ -769,10 +769,7 @@ void CreateAtoms::add_random()
if (overlapflag) {
int reject_local = 0;
//TODO this could be done only on the proc where coords are
// (using local + ghost atoms), BUT it is possible that
// ocutsq > skin^2 (although highly unlikely... warning?)
// This is only relevant for highly inhomogeous systems... ?
// Could be done more efficiently... (only on proc where coords are?)
for (int i = 0; i < nlocal; i++) {
delx = xone[0] - x[i][0];
dely = xone[1] - x[i][1];