This function performs a geometry optimization of the atomic configuration, based on certain constraints, which may be user-defined or system-dependent. The geometry minimization is performed using either a quasi-Newton or a steepest descent algorithm. See geometricOptimizationParameters() for further details on the algorithms.
The function can be used for optimizing the geometry of:
A MoleculeConfiguration, BulkConfiguration, or PeriodicAtomConfiguration configuration.
In this case the density-functional electronic structure calculation must be done using the KohnShamMethod.
For these types of configurations, it is possible to start the geometry optimization using the object returned from a previously performed self-consistent calculation.
A TwoProbeConfiguration configuration.
In this case the density-functional electronic structure calculation must be done using the TwoProbeMethod.
The geometry optimization of a two-probe system is done by mapping the open two-probe
system into a periodic atom configuration.
One consequence of this is that two-probe optimization can only be done for an equilibrium
two-probe calculation, i.e. a calculation done at zero bias.
When optimizing the two-probe system, the electrode atoms are always constrained as well
as the equivalent atoms, i.e. the atoms which are aligned to the electrodes.
For more details, see
TwoProbeConfiguration.
Note, that it is not possible to start the geometry optimization for a two-probe calculation,
using the object returned from a previously performed
self-consistent two-probe calculation.
List of arguments
A MoleculeConfiguration, BulkConfiguration, PeriodicAtomConfiguration or TwoProbeConfiguration object.
Default:
None
A KohnShamMethod or TwoProbeMethod object.
Default:
None
Geometric optimization parameters used to control the optimization.
Default:
Parameters corresponding to geometricOptimizationParameters()
supplied with no arguments.
A list of atom indices, signifying the atoms for which the positions should not
be changed during the optimization. The indices are integers in the range
from 0 to
, where
is the number
of atoms in the atomic configuration.
For a two-probe optimization the list geometric_constraints refer to the scattering
region atoms.
Note, that the equivalent atoms and electrode atoms are always constrained.
Default:
None
Runtime parameters for this calculation.
Default:
None
An object returned from a previously performed self-consistent calculation for a MoleculeConfiguration, BulkConfiguration, or PeriodicAtomConfiguration object.
Default:
None
The function returns the optimized configuration.
The type for the returned configuration will correspond to the type of configuration given as input, i.e. a MoleculeConfiguration, BulkConfiguration, PeriodicAtomConfiguration or TwoProbeConfiguration object.
Setup an optimization, where the first 5 atoms are constrained, and the maximum number of geometry steps are set to 300:
from ATK.KohnSham import * ... opt_parms = geometricOptimizationParameters(max_steps = 300) opt_cluster = calculateOptimizedAtomicGeometry( atomic_configuration = li_cluster, method = dft_method, geometric_constraints = [0,1,2,3,4], optimization_parameters = opt_parms, )
Resuming from a previous calculation:
from ATK.KohnSham import * ... dft0 = restoreSelfConsistentCalculation("example_file.nc") optimized_configuration = calculateOptimizedAtomicGeometry( self_consistent_calculation = dft0 )
Run a two-probe optimization and calculate the Mulliken population for the optimized two-probe configuration:
from ATK.KohnSham import * ... aluminum_wire = TwoProbeConfiguration(..) twoprobe_method = TwoProbeMethod(..) opt_aluminum_wire = calculateOptimizedAtomicGeometry( atomic_configuration = aluminum_wire, method = twoprobe_method) scf = executeSelfConsistentCalculation(opt_aluminum_wire,twoprobe_method) mulliken = calculateMullikenPopulation(scf)
The parameter for geometric constraints is a list of integer indices, referring to the user-specified ordering of the atoms in the atomic configuration. The recommended way to define the constraints is to evaluate the atom indices implicitly based on the geometry, rather than to specify the indices explicitly, as the indices will change as soon as additional atoms are inserted, for instance. For example, to constrain all H atoms in a molecule:
molecule = MoleculeConfiguration(...) ks_method=KohnShamMethod(...) elements = molecule.elements() constrained_atoms = [] for i in range(len(elements)): if elements[i] == Hydrogen: constrained_atoms.append(i) optimized_configuration = calculateOptimizedAtomicGeometry( molecule, method = ks_method, geometric_constraints = constrained_atoms )
While performing calculations using the default values for the
geometric
optimization parameters, it is suggested to lower the
tolerance
for the self-consistent calculations by
two or three orders of magnitude in order to achieve very
low values of the force acting on any atom.