Bases: pylada.dftcrystal.input.AttrBlock
DFT attribute block.
Adds/Sets input keyword.
Attribute block which holds parameters defining the Hamiltonian used in the calculation. It is an instance of Dft.
Applies Anderson mixing method.
Andersen mixing does not require any input. It expects None (default, does nothing), True or False. The latter is equivalent to None.
Atomic spins.
Defines the atomic spins.
>>> functional.atomspin.up = range(5)*2 + 1
>>> functional.atomspin.down = range(5)*2 + 2
For spin-polarized calculations, this would result in the CRYSTAL input:
ATOMSPIN82 1 4 1 6 1 8 11 -1 3 -1 5 -1 7 -1
There are two main variables, up and down, which are lists of atomic labels. up contains the atoms which at the start of the calculation should have an up spin, and down those atoms with a down spin. A third variable, other, corresponds to the ‘’irrelevant’’ atoms, as per CRYSTAL‘s input.
Alternatively, the up and down variables can be reached via indexing:
>>> functional.atomspin[1] is functional.atomspin.up
True
>>> functional.atomspin[-1] is functional.atomspin.down
True
>>> functional.atomspin[0] is functional.atomspin.other
True
Note
A number of settings will disable this keyword:
- py:attr:~pylada.dftcrystal.functional.dft.spin is False
- py:attr:~pylada.dftcrystal.functional.dft.spin is None or True, and the appropriate wavefunction exists.
Locks in the number of beta electrons.
This tag presents the same user-interface as spinlock.
Size of buffer for Coulomb integrals bipolar expansions.
Should be None(default), True, or False.
Applies broyden mixing method.
Broyden takes three inputs:
>>> functional.broyden.w0 = 1e-4
>>> functional.broyden.imix = 50
>>> functional.broyden.istart = 2
The above results in:
BROYDEN0.0001 50 2
The first attribute should be a floating point, whereas the second and third should be integers. The second item should be between 0 and 100, excluded, and the third larger than two. The input can also be set and accessed as an array:
>>> functional.broyden = [1e-4, 50, 2]
>>> functional.broyden[1] = 25
>>> functional.broyden.imix
25
Computaional weight of complex vs real k-points.
Size of buffer for exchange integrals bipolar expansions.
Should be None(default), True, or False.
Fock mixing during electronic minimiztion.
Should be None(default) or an integer.
Reads density matrix from disk.
Note
There seems to be a strange bug, at least on crays, where the crystal.f9 file is likely to be corrupt as far as the main CRYSTAL program can tell. However, it can still be read by PROPERTIES and transformed to a valid f98 file. That file can then be transformed back to a valid f9 file. To ensure correctness, this procedure is followed each time an f9 file is found.
Artificial shift between the valence and conduction band.
Opens the gap between occupied and unoccupied bands for better numerical behavior. It can be set as follows:
>>> functional.levshift = 5 * decihartree, False
The first parameter is the amount by which to open the gap. It should either an integer, or a signed energy quantity (see quantities). In the latter case, the input is converted to decihartree and rounded to the nearest integer.
The second parameter specifies whether to keep (True) or remove (False) the shift after diagonalization.
Maximum number of electronic minimization steps.
Should be None(default) or an integer.
Whether to use MPP or Pcrystal when running mpi.
If True and more than one process is requested, switches to using MPPcrystal as opposed to Pcrystal. This only works under the assumption that pylada.crystal_program is implemented correctly.
Whether to compute bielectronic Coulomb integrals exactly.
Should be None(default), True, or False.
Whether to compute bielectronic exchange integrals exactly.
Should be None(default), True, or False.
Whether to compute bielectronic integrals exactly.
Should be None(default), True, or False.
Whether to print formatted wavefunctions to disk.
Should be None(default), True, or False.
Whether store monoelectronic integrals to disk.
If True, the monoelctronic integrals are computed once at the start of the SCF calculation and re-read from disk at each geometric optimization step. Should be None(default), True, or False.
Whether to not use symmetry adapted functions.
Should be None(default), True, or False.
Coulomb intergrals pole truncation.
Should be None(default), or an integer between 0 and 6 included.
Whether to continue despite lack of electronic convergence.
Mulliken population analysis.
Should None(default), True, or False.
Whether to save wavefunctions at each step.
Should be None(default), True, or False.
Whether to reevaluate integrals at each electronic step.
Should be None(default), True, or False.
Extended printing request.
Printing options consists of (keyword, value) pairs. As such, they can be inputed much like arrays:
>>> functional.setprint[66] = -5
Will result in the output:
SETPRINT166 -5
which prints the eigenvalues of the first five k-points at the end of the electronic minimization loop only. The print-out options can be found in the CRYSTAL user-guide.
k-point description – SHRINK
The IS (or IS1, IS2, IS3) and ISP keywords are mapped to mp and gallat.
They can be used as follows:
functional.shrink.mp = 5
functional.shrink.gallat = 10
This will map IS to 5 and ISP to 10. ISP automatically set to equal IS (or IS1) when gallat is set to None:
functional.shrink.mp = 10
functional.shrink.gallat = None
This will print in the CRYSTAL input:
SHRINK5 5
Finally, setting mp to a sequence of at most three integers will set IS to 0 and IS1, IS2 (defaults to 1), and IS3 (defaults to 1) to the relevant values:
functional.shrink.mp = [5, 6]
functional.shrink.gallat = None
This will lead to the following input, where ISP defaulted automatically to IS1:
SHRINK0 55 6 1
Another option it to set mp and gallat directly:
functional.shrink = 8, 8
would result in the following ouput
SHRINK8 8
mp will be set to the first item. and gallat to the second. There should always be two items.
Smearing energy, if any.
Expects None (default, does nothing) or an energy wich defines the width of the smearing function.
Difference in occupation between the two spin-channels.
This object takes two values, the difference between of occupations between the two spin channels, and the number of electronic minimization steps during which the lock is maintained.
>>> functional.spinlock.nspin = 2
>>> functional.spinlock.ncycles = 30
The above sets the \(\alpha\) and \(\beta\) occupations to \(\frac{N+2}{2}\) and \(\frac{N-2}{2}\) respectively, for 30 iterations of the electronic structure minimization algorithm. It results in the input:
SPINLOCK2 30
Alternatively, the same could be done with the 2-tuple syntax:
>>> functional.spinlock = 2, 30
If either the occupation or the cycle-lock is None, then SPINLOCK is disabled.
Symmetry adapted bloch wavefunctions.
Should be None(default), True, or False.
Stop after printing ressource requirement.
Should be None(default), True, or False.
Stop after processing input and performing symmetry analysis.
Should be None(default), True, or False.
Total energy convergence criteria.
Should be None(default) or an integer.
Density matrix convergence criteria.
Should be None(default) or an integer.
Integration truncation criteria.
Should be None(default) or a sequence of 5 integers.
Pseudopotential truncation criteria.
Should be None(default) or an integer.
Bases: pylada.dftcrystal.input.AttrBlock
DFT attribute block.
Holds parameters relative to the Hamiltonian used in the calculation. These parameters can be accessed indirectly in tha functional:
>>> functional.dft.b3lyp = True
>>> functional.dft.xxlgrid = True
The above would set the Hamiltonian to the B3LYP exchange-correlation functional and the integration grid to 64 fl.oz.
Adds/Sets input keyword.
Name of the exchange functional to use. It should be one of the following: ‘becke’, ‘lda’, ‘pbe’, ‘pbesol’, ‘pwgga’, ‘sogga’, ‘vbh’, ‘wcgga’, or None(default).
Name of the correlation functional to use. It can be one of the following: ‘lyp’, ‘p86’, ‘pbe’, ‘pbesol’, ‘pwgga’, ‘pwlsd’, ‘pz’, ‘vbh’, ‘wl’, ‘vwn’, or None.
Amount of exchange to add to functional. It should be a floating point or None.
Non-local weights on exchange-correlation. A tuple of two floating point which sets the weights of the non-local part of the exchange (first) and of the correlations (second). It can also be None.
If True, then perform spin-polarized calculation. It should be None(default), True, or False.
Sets exchange, correlat, nonlocal to the B3LIP functional. Since it acts on/checks upon other attributes, it can only be set to True.
Sets exchange, correlat, nonlocal correctly for the PBE0 functional. Since it acts on/checks upon other attributes, it can only be set to True.
Sets exchange, correlat, nonlocal correctly for the SOGGAXC functional. Since it acts on/checks upon other attributes, it can only be set to True.
Contains two attributes intervals and levels which can be used to set the angular grid.
Contains two attributes intervals and nbpoints which can be used to set the radial integration grid.
Preset large integration grid.
Preset extra large integration grid.
Preset extra extra large integration grid.
DFT grid weight tolerance. Should be None(default) or an integer.
DFT density tolerance Should be None(default) or an integer.