plumed / plumed2

Development version of plumed 2
https://www.plumed.org
GNU Lesser General Public License v3.0
323 stars 269 forks source link

Benchmark distributions #1059

Closed Iximiel closed 2 months ago

Iximiel commented 2 months ago
Description

I did some modification to the Benchmark. After removing a few warnings and adding some const, I added a few options for the "simulated atoms" and changed how existing one, "the line", works.

The options that I added are:

the distributed ones are randomly generated at each step, so I think that are not suited to test a neigbour list the simple cubic do not change with advancing steps, but I may add to it a way to make the atoms "oscillate" around their positions

The original line was adjusted from

for(unsigned j=0; j<natoms; ++j)
  pos[j] = Vector(step*j, step*j+1, step*j+2);

to

for(unsigned j=0; j<natoms; ++j)
  pos[j] = Vector(j,0,0)+oscillation(step);

because the first version produces on step 0 all atoms in the same (0,1,2) position, and then a series of atoms each one at distance (s,s,s) from the previous one, where s is the current step number, and this brings some actions, like COORDINATION, to skip the costly part of the calculation. I think keeping "the line" is important to check that that component in some actions works.

These modifications also add a "contract" with the user: the uniformly distributed configuration are made such that in average each atom has a volume of 1: with nat being the number of atoms, the volume of the cube is nat, the volume of the sphere is nat and the sum of the volumes of the two spheres is again nat. Similarly the atoms on the line oscillate on a linear grid with step 1 and the a for the grid of the simple cubic is 1.

All the distribution, except from the line now return a box.

Target release

I would like my code to appear in release 2.10

Type of contribution
Copyright
Tests

unrelated: Random::RandInt is declared, but not implemented

GiovanniBussi commented 2 months ago

For me this can be merged