nanotools.relax module
Created on 2021-06-04
@author: Vincent Michaud-Rioux
- class nanotools.relax.Relax(reference_calculator, fixatoms=None, ftol=0.01, restart: bool = True)[source]
Bases:
Base
Relax
class.Examples:
from ase.build import bulk from nanotools import System, TotalEnergy, Relax a = 5.43 # lattice constant in ang atoms = bulk("Si", "diamond", a=a, cubic=True) # move atoms around a bit atoms.rattle(stdev=0.05, seed=1) atoms.positions[0,:] = 0. sys = System.from_ase_atoms(atoms) sys.cell.set_resolution(0.2) sys.kpoint.set_grid([5,5,5]) ecalc = TotalEnergy(sys) ecalc.solver.mix.alpha = 0.5 ecalc.solver.set_mpi_command("mpiexec --bind-to core -n 16") rlx = Relax.from_totalenergy(ecalc) rlx.solve()
- fixatoms
Atoms with indices in
fixatoms
will be kept fixed during the relaxation procedure.
- ftol
Force tolerance. The relaxation procedure stop once all forces are less than the tolerance.
- Type:
pint.registry.Quantity
- reference_calculator
Total energy calculator.
- restart
Use real space density matrix to restart between iterations.
- Type:
bool