目次

Class methods to GET/SET Parameters

NetCDF file

get_nc(self)
set_nc(self, nc='out.nc')
ArgumentsTypeNotes
nc string filename for netcdf file

if the ncfile attached to the calculator is changing, the old file will be copied to the new file if it doesn not exist so that all the calculator details are preserved. Otherwise, the

if the ncfile does not exist, it will get initialized.

the text file will have the same basename as the ncfile, but with a .txt extension.

get_ncoutput(self)
set_ncoutput(self, wf=None, cd=None, efp=None, esp=None)
ArgumentsTypeNotes
wf string controls output of wavefunction. values can be 'Yes' or 'No'
cd string controls output of charge density. values can be 'Yes' or 'No'
efp string controls output of effective potential. values can be 'Yes' or 'No'
esp string controls output of electrostatic potential. values can be 'Yes' or 'No'

Stay alive

get_stay_alive(self)
set_stay_alive(self, value)

ase.Atoms instance

set_atoms(self, atoms)
get_atoms(self)

get_atoms return the atoms attached to a calculator()

set_atoms attach an atoms to the calculator and update the ncfile

ArgumentsTypeNotes
atomsASE.Atoms instance

Energy cutoff

get_pw(self)
get_dw(self)
set_pw(self, pw)
set_dw(self, dw)
ArgumentsTypeNotes
pw integer the planewave cutoff in eV
dw integer the density wave cutoff

Density_WaveCutoff describes the kinetic energy neccesary to represent a wavefunction associated with the total density, i.e. $\vec{G}$-vectors for which $|\vec{G}|^2< 4\times(Density WaveCutoff)$ will be used to describe the total density (including augmentation charge and partial core density). If Density_WaveCutoff is equal to PlaneWaveCutoff this implies that the total density is as soft as the wavefunctions described by the kinetic energy cutoff PlaneWaveCutoff. If a value of Density_WaveCutoff is specified (must be larger than or equal to PlaneWaveCutoff) the program will run using two grids, one for representing the wavefunction density (softgrid_dim) and one representing the total density (hardgrid_dim). If the density can be reprensented on the same grid as the wavefunction density Density_WaveCutoff can be chosen equal to PlaneWaveCutoff (default).

Sampling K-point

get_kpts(self)
get_kpts_type(self)
set_kpts(self, kpts)
kpts
(n1,n2,n3) or [k1,k2,k3,…] or one of these chadi-cohen sets:

* cc6_1x1 * cc12_2x3 * cc18_sq3xsq3 * cc18_1x1 * cc54_sq3xsq3 * cc54_1x1 * cc162_sq3xsq3 * cc162_1x1

(n1,n2,n3) creates an n1 x n2 x n3 monkhorst-pack grid, [k1,k2,k3,…] creates a kpt-grid based on the kpoints defined in k1,k2,k3,…

There is also a possibility to have Dacapo (fortran) create the Kpoints in chadi-cohen or monkhorst-pack form. To do this you need to set the KpointSetup.gridtype attribute, and KpointSetup.

KpointSetup = [3,0,0] KpointSetup.gridtype = 'ChadiCohen'

KpointSetup(1) Chadi-Cohen k-point set 1 6 k-points 1×1 2 18-kpoints sqrt(3)*sqrt(3) 3 18-kpoints 1×1 4 54-kpoints sqrt(3)*sqrt(3) 5 54-kpoints 1×1 6 162-kpoints 1×1 7 12-kpoints 2×3 8 162-kpoints 3xsqrt 3

or KpointSetup = [4,4,4] KpointSetup.gridtype = 'MonkhorstPack' we do not use this functionality.

Spin polarization

get_spinpol(self) Returns the spin polarization setting, either True or False

set_spinpol(self, spinpol=False) set Spin polarization.

:Parameters:

spinpol : Boolean set_spinpol(True) spin-polarized. set_spinpol(False) no spin polarization, default

Specify whether to perform a spin polarized or unpolarized calculation.

Fixed magnetic moment

get_fixmagmom(self) returns the value of FixedMagneticMoment set_fixmagmom(self, fixmagmom=None) set a fixed magnetic moment for a spin polarized calculation

:Parameters:

fixmagmom : float the magnetic moment of the cell in Bohr magnetons

Fermi temperature

get_ft(self)
set_ft(self, ft)
ArgumentsTypeNotes
ft floatFermi temperature in kT (eV)

Electronic temperature, corresponding to gaussian occupation statistics. Device used to stabilize the convergence towards the electronic ground state. Higher values stabilizes the convergence. Values in the range 0.1-1.0 eV are recommended, depending on the complexity of the Fermi surface (low values for d-metals and narrow gap semiconducters, higher for free electron-like metals).

Exchange-correlation functional

get_xc(self)
set_xc(self, xc)

set_xc

ArgumentsTypeValueNotes
xc string Must be one of 'PZ', 'VWN', 'PW91', 'PBE', 'revPBE', 'RPBE'
“PZ” Perdew Zunger LDA-parametrization
“VWN” Vosko Wilk Nusair LDA-parametrization
“PW91” Perdew Wang 91 GGA-parametrization
“PBE” Perdew Burke Ernzerhof GGA-parametrization
“revPBE” revised PBE/1 GGA-parametrization
“RPBE” revised PBE/2 GGA-parametrization

Selects which density functional to use for exchange-correlation when performing electronic minimization (the electronic energy is minimized with respect to this selected functional) Notice that the electronic energy is also evaluated non-selfconsistently by DACAPO for other exchange-correlation functionals Recognized options :

option “PZ” is not allowed for spin polarized calculation; use “VWN” instead.

Dipole Correction

get_dipole(self)
set_dipole(self, status=True, mixpar=0.2, initval=0.0, adddipfield=0.0, position=None)

set_dipole

ArgumentsTypeNotes
status Boolean True turns dipole on. False turns Dipole off.
mixpar float Mixing Parameter for the the dipole correction field (1)
initval float initial value to start at
adddipfield float additional dipole field to add (units : V/ang) (2)
position float scaled coordinates along third unit cell direction. (3)

(1) Mixing Parameter for the the dipole correction field during the electronic minimization process. If instabilities occur during electronic minimization, this value may be decreased.

(2) External additive, constant electrostatic field along third unit cell vector, corresponding to an external dipole layer. The field discontinuity follows the position of the dynamical dipole correction, i.e. if DipoleCorrection:DipoleLayerPosition is set, the field discontinuity is at this value, otherwise it is at the vacuum position farthest from any other atoms on both sides of the slab.

(3) If this attribute is set, DACAPO will position the compensation dipole layer plane in at the provided value. If this attribute is not set, DACAPO will put the compensation dipole layer plane in the vacuum position farthest from any other atoms on both sides of the slab. Do not set this to 0.0

calling set_dipole() sets all default values.

get_dipole_moment

get_dipole_moment(self, atoms=None)

Number of bands

get_number_of_bands = get_nbands(self)
get_nbands(self)
set_nbands(self, nbands=None)

set_nbands

ArgumentsTypeNotes
nbands integer the number of bands.

if nbands = None the function returns with nothing done. At calculate time, if there are still no bands, they will be set by:
the number of bands is calculated as $nbands=nvalence*0.65 + 4$

Symmetry

get_symmetry(self)
set_symmetry(self, val=False)

set_symmetry

ArgumentsTypeValueNotes
val Boolean True Maximum symmetry is used
False No symmetry is used

This variable controls the if and how DACAPO should attempt using symmetry in the calculation. Imposing symmetry generally speeds up the calculation and reduces numerical noise to some extent. Symmetry should always be applied to the maximum extent, when ions are not moved. When relaxing ions, however, the symmetry of the equilibrium state may be lower than the initial state. Such an equilibrium state with lower symmetry is missed, if symmetry is imposed. Molecular dynamics-like algorithms for ionic propagation will generally not break the symmetry of the initial state, but some algorithms, like the BFGS may break the symmetry of the initial state. Recognized options:

“Off”
No symmetry will be imposed, apart from time inversion symmetry in recipical space. This is utilized to reduce the k-point sampling set for Brillouin zone integration and has no influence on the ionic forces/motion.
“Maximum”
DACAPO will look for symmetry in the supplied atomic structure and extract the highest possible symmetry group. During the calculation, DACAPO will impose the found spatial symmetry on ionic forces and electronic structure,

i.e. the symmetry will be conserved during the calculation.

Stress

set_calculate_stress(self, stress=True)
get_calculate_stress(self)

set_calculate_stress

ArgumentsTypeValueNote
stressboolean True calculates stress
False does not calculate stress

General get/set method

get(self, *args)
set(self, **kwargs)

example

calc.get('nbands')