Step Taking (pele.takestep)#
The performance of the basin hopping critically depends on the step taking algorithm. pele comes with a set of basic takestep routines. For anything non-standard, the user is encouraged to implement a custom takestep routine.
Basic steptaking#
|
Random displacement on each individual coordinate |
|
Displace each atom be a uniform random vector |
|
Random rotation for angle axis vector |
|
Implement a takestep move which swaps two un-like atoms |
Grouping moves + adaptive steptaking#
|
Adaptive stepsize adjustment |
|
adjust both the stepsize and the temperature adaptively |
|
group several takestep objects |
block based step taking |
|
|
Reseeding if energy did not improve |
Writing custom steptaking routines#
pele makes it very simple to design custom takestep routines. Any takestep class should have TakestepInterface as a parent class (directly derived from that or a child class of TakestepInterface).
from pele.takestep import TakestepInterface
from pele.takestep import buildingblocks as bb
class MyStep(TakestepInterface):
def takeStep(self, coords, **kwargs):
# create an rigid body coordinate interface for coordinates array
ca = CoordsAdapter(nrigid=GMIN.getNRigidBody(), nlattice=6, coords=coords)
# rotate one random rigid body
select = [np.random.randint(0,nrigid)]
bb.rotate(1.6, ca.rotRigid, indices = select)
Building blocks to design custom takestep routines
|
uniform random displacement |
|
uniform random rotation of angle axis vector |
|
uniform random displacement of reduced coordinates |
The takestep interface
Interface for step taking classes |
|
|
basic takestep interface which stores the stepsize |
|
basic takestep interface on slice of coordinates array |