Jacapo Object
Python interface to the Fortran DACAPO code. <html><head><title>Python: module ase.calculators.jacapo.jacapo</title></head><body bgcolor=“#f0f0f8”><br> <br> <p> <table summary=“section” border=“0” cellpadding=“2” cellspacing=“0” width=“100%”> <tbody>
<tr><td> </td> <td width=“100%”> <p> <table summary=“section” border=“0” cellpadding=“2” cellspacing=“0” width=“100%”> <tbody><tr bgcolor=“#ffc8d8”> <td colspan=“3” valign=“bottom”> <br> <font color=“#000000” face=“helvetica, arial”><a name=“Jacapo”>class <strong>Jacapo</strong></a></font></td></tr>
<tr bgcolor=“#ffc8d8”><td rowspan=“2”><tt> </tt></td> <td colspan=“2”><tt>Python interface to the Fortran DACAPO code<br> </tt></td></tr> <tr><td> </td> <td width=“100%”>Methods defined here:<br> <dl><dt><a name=“Jacapo-del”><strong>del</strong></a>(self)</dt><dd><tt>If calculator is deleted try to stop dacapo program</tt></dd></dl>
<dl><dt><a name=“Jacapo-init”><strong>init</strong></a>(self, nc<font color=“#909090”>='out.nc'</font>, outnc<font color=“#909090”>=None</font>, deletenc<font color=“#909090”>=False</font>, debug<font color=“#909090”>=30</font>, stay_alive<font color=“#909090”>=False</font>, kwargs)</dt><dd><tt>Initialize the <a href=“#Jacapo”>Jacapo</a> calculator<br> <br> :Parameters:<br> <br> nc : string<br> output netcdf file, or input file if nc already exists<br> <br> outnc : string<br> output file. by default equal to nc<br> <br> deletenc : Boolean<br> determines whether the ncfile is deleted on initialization<br> so a fresh run occurs. If True, the ncfile is deleted if<br> it exists.<br> <br> debug : integer<br> logging debug level.<br> <br> Valid kwargs:<br> <br> atoms : ASE.Atoms instance<br> atoms is an ase.Atoms object that will be attached<br> to this calculator.<br> <br> pw : integer<br> sets planewave cutoff<br> <br> dw : integer<br> sets density cutoff<br> <br> kpts : iterable<br> set chadi-cohen, monkhorst-pack kpt grid,<br> e.g. kpts = (2,2,1) or explicit list of kpts<br> <br> spinpol : Boolean<br> sets whether spin-polarization is used or not.<br> <br> fixmagmom : float<br> set the magnetic moment of the unit cell. only used<br> in spin polarize calculations<br> <br> ft : float<br> set the Fermi temperature used in occupation smearing<br> <br> xc : string<br> set the exchange-correlation functional.<br> one of ['PZ','VWN','PW91','PBE','RPBE','revPBE'],<br> <br> dipole<br> boolean<br> turn the dipole correction on (True) or off (False)<br> <br> or:<br> dictionary of parameters to fine-tune behavior<br> {'status':False,<br> 'mixpar':0.2,<br> 'initval':0.0,<br> 'adddipfield':0.0,<br> 'position':None}<br> <br> nbands : integer<br> set the number of bands<br> <br> symmetry : Boolean<br> Turn symmetry reduction on (True) or off (False)<br> <br> stress : Boolean<br> Turn stress calculation on (True) or off (False)<br> <br> debug : level for logging<br> could be something like<br> logging.DEBUG or an integer 0-50. The higher the integer,<br> the less information you see set debug level (0 = off, 10 =<br> extreme)<br> <br> Modification of the nc file only occurs at calculate time if needed<br> <br> >>> calc = <a href=“#Jacapo”>Jacapo</a>('CO.nc')<br> <br> reads the calculator from CO.nc if it exists or<br> minimally initializes CO.nc with dimensions if it does not exist.<br> <br> >>> calc = <a href=“#Jacapo”>Jacapo</a>('CO.nc', pw=300)<br> <br> reads the calculator from CO.nc or initializes it if<br> it does not exist and changes the planewave cutoff energy to<br> 300eV<br> <br> >>> atoms = <a href=“#Jacapo”>Jacapo</a>.<a href=“#Jacapo-read_atoms”>read_atoms</a>('CO.nc')<br> <br> returns the atoms in the netcdffile CO.nc, with the calculator<br> attached to it.<br> <br> >>> atoms, calc = <a href=“#-read”>read</a>('CO.nc')</tt></dd></dl> <dl><dt><a name=“Jacapo-str”><strong>str</strong></a>(self)</dt><dd><tt>pretty-print the calculator and atoms.<br> <br> we read everything directly from the ncfile to prevent<br> triggering any calculations</tt></dd></dl> <dl><dt><a name=“Jacapo-atoms_are_equal”><strong>atoms_are_equal</strong></a>(self, atoms)</dt><dd><tt>comparison of atoms to self.<strong>atoms</strong> using tolerances to account<br> for float/double differences and float math.</tt></dd></dl> <dl><dt><a name=“Jacapo-attach_child”><strong>attach_child</strong></a>(self, child)</dt></dl> <dl><dt><a name=“Jacapo-calculate”><strong>calculate</strong></a>(self)</dt><dd><tt>run a calculation.<br> <br> you have to be a little careful with code in here. Use the<br> calculation_required function to tell if a calculation is<br> required. It is assumed here that if you call this, you mean<br> it.</tt></dd></dl> <dl><dt><a name=“Jacapo-calculation_required”><strong>calculation_required</strong></a>(self, atoms<font color=“#909090”>=None</font>, quantities<font color=“#909090”>=None</font>)</dt><dd><tt>determines if a calculation is needed.<br> <br> return True if a calculation is needed to get up to date data.<br> return False if no calculation is needed.<br> <br> quantities is here because of the ase interface.</tt></dd></dl> <dl><dt><a name=“Jacapo-delete_ncattdimvar”><strong>delete_ncattdimvar</strong></a>(self, ncf, ncattrs<font color=“#909090”>=None</font>, ncdims<font color=“#909090”>=None</font>, ncvars<font color=“#909090”>=None</font>)</dt><dd><tt>helper function to delete attributes,<br> dimensions and variables in a netcdffile<br> <br> this functionality is not implemented for some reason in<br> netcdf, so the only way to do this is to copy all the<br> attributes, dimensions, and variables to a new file, excluding<br> the ones you want to delete and then rename the new file.<br> <br> if you delete a dimension, all variables with that dimension<br> are also deleted.</tt></dd></dl> <dl><dt><a name=“Jacapo-execute_external_dynamics”><strong>execute_external_dynamics</strong></a>(self, nc<font color=“#909090”>=None</font>, txt<font color=“#909090”>=None</font>, stoppfile<font color=“#909090”>='stop'</font>, stopprogram<font color=“#909090”>=None</font>)</dt><dd><tt>Implementation of the stay alive functionality with socket<br> communication between dacapo and python. Known limitations:<br> It is not possible to start 2 independent Dacapo calculators<br> from the same python process, since the python PID is used as<br> identifier for the script[PID].py file.</tt></dd></dl> <dl><dt><a name=“Jacapo-execute_parent_calculation”><strong>execute_parent_calculation</strong></a>(self)</dt><dd><tt>Implementation of an extra level of parallelization, where one jacapo calculator spawns several<br> dacapo.run processes. This is used for NEBs parallelized over images.</tt></dd></dl> <dl><dt><a name=“Jacapo-get”><strong>get</strong></a>(self, *args)</dt><dd><tt>get values for args.<br> <br> e.g. calc.<a href=“#Jacapo-get”>get</a>('nbands')</tt></dd></dl> <dl><dt><a name=“Jacapo-get_ados”><strong>get_ados</strong></a>(self, kwargs)</dt><dd><tt>attempt at maintaining backward compatibility with get_ados<br> returning data<br> <br> Now when we call calc.<a href=“#Jacapo-get_ados”>get_ados</a>() it will return settings,<br> <br> and calc.<a href=“#Jacapo-get_ados”>get_ados</a>(atoms=[],…) should return data</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ados_data”><strong>get_ados_data</strong></a>(self, atoms, orbitals, cutoff, spin)</dt><dd><tt>get atom projected data<br> <br> :Parameters:<br> <br> atoms<br> list of atom indices (integers)<br> <br> orbitals<br> list of strings<br> ['s','p','d'],<br> ['px','py','pz']<br> ['d_zz', 'dxx-yy', 'd_xy', 'd_xz', 'd_yz']<br> <br> cutoff : string<br> cutoff radius you want the results for 'short' or 'infinite'<br> <br> spin<br> : list of integers<br> spin you want the results for<br> [0] or [1] or [0,1] for both<br> <br> returns (egrid, ados)<br> egrid has the fermi level at 0 eV</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_all_eigenvalues”><strong>get_all_eigenvalues</strong></a>(self, spin<font color=“#909090”>=0</font>)</dt><dd><tt>return all the eigenvalues at all the kpoints for a spin.<br> <br> :Parameters:<br> <br> spin : integer<br> which spin the eigenvalues are for</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ascii_debug”><strong>get_ascii_debug</strong></a>(self)</dt><dd><tt>Return the debug settings in Dacapo</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_atoms”><strong>get_atoms</strong></a>(self)</dt><dd><tt>return the atoms attached to a calculator()</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_bz_k_points”><strong>get_bz_k_points</strong></a>(self)</dt><dd><tt>return list of kpoints in the Brillouin zone</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_calculate_stress”><strong>get_calculate_stress</strong></a>(self)</dt><dd><tt>return whether stress is calculated or not</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_cd”><strong>get_cd</strong></a> = <a href=“#Jacapo-get_charge_density”>get_charge_density</a>(self, spin<font color=“#909090”>=0</font>)</dt></dl>
<dl><dt><a name=“Jacapo-get_charge_density”><strong>get_charge_density</strong></a>(self, spin<font color=“#909090”>=0</font>)</dt><dd><tt>return x,y,z,charge density data<br> <br> x,y,z are grids sampling the unit cell<br> cd is the charge density data<br> <br> netcdf documentation::<br> <br> ChargeDensity(number_of_spin,<br> hardgrid_dim3,<br> hardgrid_dim2,<br> hardgrid_dim1)<br> ChargeDensity:Description = “realspace charge density” ;<br> ChargeDensity:unit = “-e/A^3” ;</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_charge_mixing”><strong>get_charge_mixing</strong></a>(self)</dt><dd><tt>return charge mixing parameters</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_convergence”><strong>get_convergence</strong></a>(self)</dt><dd><tt>return convergence settings for Dacapo</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_debug”><strong>get_debug</strong></a>(self)</dt><dd><tt>Return the python logging level</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_decoupling”><strong>get_decoupling</strong></a>(self)</dt><dd><tt>return the electrostatic decoupling parameters</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_dipole”><strong>get_dipole</strong></a>(self)</dt><dd><tt>return dictionary of parameters if the DipoleCorrection was used</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_dipole_moment”><strong>get_dipole_moment</strong></a>(self, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>return dipole moment of unit cell<br> <br> Defined by the vector connecting the center of electron charge<br> density to the center of nuclear charge density.<br> <br> Units = eV*angstrom<br> <br> 1 Debye = 0.208194 eV*angstrom</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_dw”><strong>get_dw</strong></a>(self)</dt><dd><tt>return the density wave cutoff</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ef”><strong>get_ef</strong></a> = <a href=“#Jacapo-get_fermi_level”>get_fermi_level</a>(self)</dt></dl>
<dl><dt><a name=“Jacapo-get_effective_potential”><strong>get_effective_potential</strong></a>(self, spin<font color=“#909090”>=1</font>)</dt><dd><tt>returns the realspace local effective potential for the spin.<br> the units of the potential are eV<br> <br> :Parameters:<br> <br> spin : integer<br> specify which spin you want, 0 or 1</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_eigenvalues”><strong>get_eigenvalues</strong></a>(self, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>)</dt><dd><tt>return the eigenvalues for a kpt and spin<br> <br> :Parameters:<br> <br> kpt : integer<br> index of the IBZ kpoint<br> <br> spin : integer<br> which spin the eigenvalues are for</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_electronic_minimization”><strong>get_electronic_minimization</strong></a>(self)</dt><dd><tt>get method and diagonalizations per band for electronic<br> minimization algorithms</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_electronic_temperature”><strong>get_electronic_temperature</strong></a> = <a href=“#Jacapo-get_ft”>get_ft</a>(self)</dt></dl>
<dl><dt><a name=“Jacapo-get_electrostatic_potential”><strong>get_electrostatic_potential</strong></a>(self, spin<font color=“#909090”>=0</font>)</dt><dd><tt>get electrostatic potential<br> <br> Netcdf documentation::<br> <br> double ElectrostaticPotential(number_of_spin,<br> hardgrid_dim3,<br> hardgrid_dim2,<br> hardgrid_dim1) ;<br> ElectrostaticPotential:<br> Description = “realspace local effective potential” ;<br> unit = “eV” ;</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ensemble_coefficients”><strong>get_ensemble_coefficients</strong></a>(self)</dt><dd><tt>returns exchange correlation ensemble coefficients</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_esp”><strong>get_esp</strong></a> = <a href=“#Jacapo-get_electrostatic_potential”>get_electrostatic_potential</a>(self, spin<font color=“#909090”>=0</font>)</dt></dl>
<dl><dt><a name=“Jacapo-get_external_dipole”><strong>get_external_dipole</strong></a>(self)</dt><dd><tt>return the External dipole settings</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_extpot”><strong>get_extpot</strong></a>(self)</dt><dd><tt>return the external potential set in teh calculator</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_extracharge”><strong>get_extracharge</strong></a>(self)</dt><dd><tt>Return the extra charge set in teh calculator</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_fermi_level”><strong>get_fermi_level</strong></a>(self)</dt><dd><tt>return Fermi level</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_fftgrid”><strong>get_fftgrid</strong></a>(self)</dt><dd><tt>return soft and hard fft grids</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_fixmagmom”><strong>get_fixmagmom</strong></a>(self)</dt><dd><tt>returns the value of FixedMagneticMoment</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_forces”><strong>get_forces</strong></a>(self, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>Calculate atomic forces</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ft”><strong>get_ft</strong></a>(self)</dt><dd><tt>return the FermiTemperature used in the calculation</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ibz_k_points”><strong>get_ibz_k_points</strong></a> = <a href=“#Jacapo-get_ibz_kpoints”>get_ibz_kpoints</a>(self)</dt></dl>
<dl><dt><a name=“Jacapo-get_ibz_kpoints”><strong>get_ibz_kpoints</strong></a>(self)</dt><dd><tt>return list of kpoints in the irreducible brillouin zone</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_k_point_weights”><strong>get_k_point_weights</strong></a>(self)</dt><dd><tt>return the weights on the IBZ kpoints</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_kpts”><strong>get_kpts</strong></a>(self)</dt><dd><tt>return the BZ kpts</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_kpts_type”><strong>get_kpts_type</strong></a>(self)</dt><dd><tt>return the kpt grid type</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_magnetic_moment”><strong>get_magnetic_moment</strong></a>(self, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>calculates the magnetic moment (Bohr-magnetons) of the supercell</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_magnetic_moments”><strong>get_magnetic_moments</strong></a>(self, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>return magnetic moments on each atom after the calculation is<br> run</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_mdos”><strong>get_mdos</strong></a>(self)</dt><dd><tt>return multicentered projected dos parameters</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_mdos_data”><strong>get_mdos_data</strong></a>(self, spin<font color=“#909090”>=0</font>, cutoffradius<font color=“#909090”>='infinite'</font>)</dt><dd><tt>returns data from multicentered projection<br> <br> <br> returns (mdos, rotmat)<br> <br> the rotation matrices are retrieved from the text file. I am<br> not sure what you would do with these, but there was a note<br> about them in the old documentation so I put the code to<br> retrieve them here. the syntax for the return value is:<br> rotmat[atom#][label] returns the rotation matrix for the<br> center on the atom# for label. I do not not know what the<br> label refers to.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_nbands”><strong>get_nbands</strong></a>(self)</dt><dd><tt>return the number of bands used in the calculation</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_nc”><strong>get_nc</strong></a>(self)</dt><dd><tt>return the ncfile used for output</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ncoutput”><strong>get_ncoutput</strong></a>(self)</dt><dd><tt>returns the control variables for the ncfile</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_number_of_bands”><strong>get_number_of_bands</strong></a> = <a href=“#Jacapo-get_nbands”>get_nbands</a>(self)</dt></dl>
<dl><dt><a name=“Jacapo-get_number_of_electrons”><strong>get_number_of_electrons</strong></a> = <a href=“#Jacapo-get_valence”>get_valence</a>(self, atoms<font color=“#909090”>=None</font>)</dt></dl>
<dl><dt><a name=“Jacapo-get_number_of_grid_points”><strong>get_number_of_grid_points</strong></a>(self)</dt><dd><tt>return soft fft grid</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_number_of_iterations”><strong>get_number_of_iterations</strong></a>(self)</dt></dl>
<dl><dt><a name=“Jacapo-get_number_of_spins”><strong>get_number_of_spins</strong></a>(self)</dt><dd><tt>if spin-polarized returns 2, if not returns 1</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_occ”><strong>get_occ</strong></a> = <a href=“#Jacapo-get_occupation_numbers”>get_occupation_numbers</a>(self, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>)</dt></dl>
<dl><dt><a name=“Jacapo-get_occupation_numbers”><strong>get_occupation_numbers</strong></a>(self, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>)</dt><dd><tt>return occupancies of eigenstates for a kpt and spin<br> <br> :Parameters:<br> <br> kpt : integer<br> index of the IBZ kpoint you want the occupation of<br> <br> spin : integer<br> 0 or 1</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_occupationstatistics”><strong>get_occupationstatistics</strong></a>(self)</dt><dd><tt>return occupation statistics method</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_potential_energy”><strong>get_potential_energy</strong></a>(self, atoms<font color=“#909090”>=None</font>, force_consistent<font color=“#909090”>=False</font>)</dt><dd><tt>return the potential energy.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_pseudo_wave_function”><strong>get_pseudo_wave_function</strong></a>(self, band<font color=“#909090”>=0</font>, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>, pad<font color=“#909090”>=True</font>)</dt><dd><tt>return the pseudo wavefunction</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_pseudopotentials”><strong>get_pseudopotentials</strong></a>(self)</dt><dd><tt>get pseudopotentials set for atoms attached to calculator</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_psp”><strong>get_psp</strong></a>(self, sym<font color=“#909090”>=None</font>, z<font color=“#909090”>=None</font>)</dt><dd><tt>get the pseudopotential filename from the psp database<br> <br> :Parameters:<br> <br> sym : string<br> the chemical symbol of the species<br> <br> z : integer<br> the atomic number of the species<br> <br> <br> you can only specify sym or z. Returns the pseudopotential<br> filename, not the full path.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_psp_nuclear_charge”><strong>get_psp_nuclear_charge</strong></a>(self, psp)</dt><dd><tt>get the nuclear charge of the atom from teh psp-file.<br> <br> This is not the same as the atomic number, nor is it<br> necessarily the negative of the number of valence electrons,<br> since a psp may be an ion. this function is needed to compute<br> centers of ion charge for the dipole moment calculation.<br> <br> We read in the valence ion configuration from the psp file and<br> add up the charges in each shell.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_psp_valence”><strong>get_psp_valence</strong></a>(self, psp)</dt><dd><tt>get the psp valence charge on an atom from the pspfile.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_pw”><strong>get_pw</strong></a>(self)</dt><dd><tt>return the planewave cutoff used</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_reciprocal_bloch_function”><strong>get_reciprocal_bloch_function</strong></a>(self, band<font color=“#909090”>=0</font>, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>)</dt><dd><tt>return the reciprocal bloch function. Need for <a href=“#Jacapo”>Jacapo</a><br> Wannier class.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_reciprocal_fft_index”><strong>get_reciprocal_fft_index</strong></a>(self, kpt<font color=“#909090”>=0</font>)</dt><dd><tt>return the Wave Function FFT Index</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_scratch”><strong>get_scratch</strong></a>(self)</dt><dd><tt>finds an appropriate scratch directory for the calculation</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_spin_polarized”><strong>get_spin_polarized</strong></a>(self)</dt><dd><tt>Return True if calculate is spin-polarized or False if not</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_spinpol”><strong>get_spinpol</strong></a>(self)</dt><dd><tt>Returns the spin polarization setting, either True or False</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_status”><strong>get_status</strong></a>(self)</dt><dd><tt>get status of calculation from ncfile. usually one of:<br> 'new',<br> 'aborted'<br> 'running'<br> 'finished'<br> None</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_stay_alive”><strong>get_stay_alive</strong></a>(self)</dt><dd><tt>return the stay alive settings</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_stress”><strong>get_stress</strong></a>(self, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>get stress on the atoms.<br> <br> you should have set up the calculation<br> to calculate stress first.<br> <br> returns [sxx, syy, szz, syz, sxz, sxy]</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_symmetry”><strong>get_symmetry</strong></a>(self)</dt><dd><tt>return the type of symmetry used</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_txt”><strong>get_txt</strong></a>(self)</dt><dd><tt>return the txt file used for output</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_ucgrid”><strong>get_ucgrid</strong></a>(self, dims)</dt><dd><tt>Return X,Y,Z grids for uniform sampling of the unit cell<br> <br> dims = (n0,n1,n2)<br> <br> n0 points along unitcell vector 0<br> n1 points along unitcell vector 1<br> n2 points along unitcell vector 2</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_valence”><strong>get_valence</strong></a>(self, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>return the total number of valence electrons for the<br> atoms. valence electrons are read directly from the<br> pseudopotentials.<br> <br> the psp filenames are stored in the ncfile. They may be just<br> the name of the file, in which case the psp may exist in the<br> same directory as the ncfile, or in $DACAPOPATH, or the psp<br> may be defined by an absolute or relative path. This function<br> deals with all these possibilities.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_wannier_localization_matrix”><strong>get_wannier_localization_matrix</strong></a>(self, nbands, dirG, kpoint, nextkpoint, G_I, spin)</dt><dd><tt>return wannier localization matrix</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_wave_function”><strong>get_wave_function</strong></a>(self, band<font color=“#909090”>=0</font>, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>)</dt><dd><tt>return the wave function. This is the pseudo wave function<br> divided by volume.</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_wf”><strong>get_wf</strong></a> = <a href=“#Jacapo-get_wave_function”>get_wave_function</a>(self, band<font color=“#909090”>=0</font>, kpt<font color=“#909090”>=0</font>, spin<font color=“#909090”>=0</font>)</dt></dl>
<dl><dt><a name=“Jacapo-get_xc”><strong>get_xc</strong></a>(self)</dt><dd><tt>return the self-consistent exchange-correlation functional used<br> <br> returns a string</tt></dd></dl>
<dl><dt><a name=“Jacapo-get_xc_energies”><strong>get_xc_energies</strong></a>(self, *functional)</dt><dd><tt>Get energies for different functionals self-consistent and<br> non-self-consistent.<br> <br> :Parameters:<br> <br> functional : strings<br> some set of 'PZ','VWN','PW91','PBE','revPBE', 'RPBE'<br> <br> This function returns the self-consistent energy and/or<br> energies associated with various functionals.<br> The functionals are currently PZ,VWN,PW91,PBE,revPBE, RPBE.<br> The different energies may be useful for calculating improved<br> adsorption energies as in B. Hammer, L.B. Hansen and<br> J.K. Norskov, Phys. Rev. B 59,7413.<br> Examples:<br> get_xcenergies() #returns all the energies<br> get_xcenergies('PBE') # returns the PBE total energy<br> get_xcenergies('PW91','PBE','revPBE') # returns a<br> # list of energies in the order asked for</tt></dd></dl>
<dl><dt><a name=“Jacapo-initial_wannier”><strong>initial_wannier</strong></a>(self, initialwannier, kpointgrid, fixedstates, edf, spin)</dt><dd><tt>return initial wannier</tt></dd></dl>
<dl><dt><a name=“Jacapo-initnc”><strong>initnc</strong></a>(self, ncfile<font color=“#909090”>=None</font>)</dt><dd><tt>create an ncfile with minimal dimensions in it<br> <br> this makes sure the dimensions needed for other set functions<br> exist when needed.</tt></dd></dl>
<dl><dt><a name=“Jacapo-read_only_atoms”><strong>read_only_atoms</strong></a>(self, ncfile)</dt><dd><tt>read only the atoms from an existing netcdf file. Used to<br> initialize a calculator from a ncfilename.<br> <br> :Parameters:<br> <br> ncfile : string<br> name of file to read from.<br> <br> return ASE.Atoms with no calculator attached or None if no<br> atoms found</tt></dd></dl>
<dl><dt><a name=“Jacapo-restart”><strong>restart</strong></a>(self)</dt><dd><tt>Restart the calculator by deleting nc dimensions that will<br> be rewritten on the next calculation. This is sometimes required<br> when certain dimensions change related to unitcell size changes<br> planewave/densitywave cutoffs and kpt changes. These can cause<br> fortran netcdf errors if the data does not match the pre-defined<br> dimension sizes.<br> <br> also delete all the output from previous calculation.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set”><strong>set</strong></a>(self, **kwargs)</dt><dd><tt>set a parameter<br> <br> parameter is stored in dictionary that is processed later if a<br> calculation is need.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_ados”><strong>set_ados</strong></a>(self, energywindow<font color=“#909090”>=(-15, 5)</font>, energywidth<font color=“#909090”>=0.2</font>, npoints<font color=“#909090”>=250</font>, cutoff<font color=“#909090”>=1.0</font>)</dt><dd><tt>setup calculation of atom-projected density of states<br> <br> :Parameters:<br> <br> energywindow : (float, float)<br> sets (emin,emax) in eV referenced to the Fermi level<br> <br> energywidth : float<br> the gaussian used in smearing<br> <br> npoints : integer<br> the number of points to sample the DOS at<br> <br> cutoff : float<br> the cutoff radius in angstroms for the integration.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_ascii_debug”><strong>set_ascii_debug</strong></a>(self, level)</dt><dd><tt>set the debug level for Dacapo<br> <br> :Parameters:<br> <br> level : string<br> one of 'Off', 'MediumLevel', 'HighLevel'</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_atoms”><strong>set_atoms</strong></a>(self, atoms)</dt><dd><tt>attach an atoms to the calculator and update the ncfile<br> <br> :Parameters:<br> <br> atoms<br> ASE.Atoms instance</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_calculate_stress”><strong>set_calculate_stress</strong></a>(self, stress<font color=“#909090”>=True</font>)</dt><dd><tt>Turn on stress calculation<br> <br> :Parameters:<br> <br> stress : boolean<br> <a href=“#Jacapo-set_calculate_stress”>set_calculate_stress</a>(True) calculates stress<br> <a href=“#Jacapo-set_calculate_stress”>set_calculate_stress</a>(False) do not calculate stress</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_charge_mixing”><strong>set_charge_mixing</strong></a>(self, method<font color=“#909090”>='Pulay'</font>, mixinghistory<font color=“#909090”>=10</font>, mixingcoeff<font color=“#909090”>=0.1</font>, precondition<font color=“#909090”>='No'</font>, updatecharge<font color=“#909090”>='Yes'</font>)</dt><dd><tt>set density mixing method and parameters<br> <br> :Parameters:<br> <br> method : string<br> 'Pulay' for Pulay mixing. only one supported now<br> <br> mixinghistory : integer<br> number of iterations to mix<br> Number of charge residual vectors stored for generating<br> the Pulay estimate on the self-consistent charge density,<br> see Sec. 4.2 in Kresse/Furthmuller:<br> Comp. Mat. Sci. 6 (1996) p34ff<br> <br> mixingcoeff : float<br> Mixing coefficient for Pulay charge mixing, corresponding<br> to A in G$^1$ in Sec. 4.2 in Kresse/Furthmuller:<br> Comp. Mat. Sci. 6 (1996) p34ff<br> <br> precondition : string<br> 'Yes' or 'No'<br> <br> * “Yes” : Kerker preconditiong is used,<br> i.e. q$_0$ is different from zero, see eq. 82<br> in Kresse/Furthmuller: Comp. Mat. Sci. 6 (1996).<br> The value of q$_0$ is fix to give a damping of 20<br> of the lowest q vector.<br> <br> * “No” : q$_0$ is zero and mixing is linear (default).<br> <br> updatecharge : string<br> 'Yes' or 'No'<br> <br> * “Yes” : Perform charge mixing according to<br> ChargeMixing:Method setting<br> <br> * “No” : Freeze charge to initial value.<br> This setting is useful when evaluating the Harris-Foulkes<br> density functional</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_convergence”><strong>set_convergence</strong></a>(self, energy<font color=“#909090”>=1e-05</font>, density<font color=“#909090”>=0.0001</font>, occupation<font color=“#909090”>=0.001</font>, maxsteps<font color=“#909090”>=None</font>, maxtime<font color=“#909090”>=None</font>)</dt><dd><tt>set convergence criteria for stopping the dacapo calculator.<br> <br> :Parameters:<br> <br> energy : float<br> set total energy change (eV) required for stopping<br> <br> density : float<br> set density change required for stopping<br> <br> occupation : float<br> set occupation change required for stopping<br> <br> maxsteps : integer<br> specify maximum number of steps to take<br> <br> maxtime : integer<br> specify maximum number of hours to run.<br> <br> Autopilot not supported here.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_debug”><strong>set_debug</strong></a>(self, debug)</dt><dd><tt>set debug level for python logging<br> <br> debug should be an integer from 0-100 or one of the logging<br> constants like logging.DEBUG, logging.WARN, etc…</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_decoupling”><strong>set_decoupling</strong></a>(self, ngaussians<font color=“#909090”>=3</font>, ecutoff<font color=“#909090”>=100</font>, gausswidth<font color=“#909090”>=0.35</font>)</dt><dd><tt>Decoupling activates the three dimensional electrostatic<br> decoupling. Based on paper by Peter E. Bloechl: JCP 103<br> page7422 (1995).<br> <br> :Parameters:<br> <br> ngaussians : int<br> The number of gaussian functions per atom<br> used for constructing the model charge of the system<br> <br> ecutoff : int<br> The cut off energy (eV) of system charge density in<br> g-space used when mapping constructing the model change of<br> the system, i.e. only charge density components below<br> ECutoff enters when constructing the model change.<br> <br> gausswidth : float<br> The width of the Gaussians defined by<br> $widthofgaussian*1.5^(n-1)$ $n$=(1 to numberofgaussians)</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_dipole”><strong>set_dipole</strong></a>(self, status<font color=“#909090”>=True</font>, mixpar<font color=“#909090”>=0.2</font>, initval<font color=“#909090”>=0.0</font>, adddipfield<font color=“#909090”>=0.0</font>, position<font color=“#909090”>=None</font>)</dt><dd><tt>turn on and set dipole correction scheme<br> <br> :Parameters:<br> <br> status : Boolean<br> True turns dipole on. False turns Dipole off<br> <br> mixpar : float<br> Mixing Parameter for the the dipole correction field<br> during the electronic minimization process. If instabilities<br> occur during electronic minimization, this value may be<br> decreased.<br> <br> initval : float<br> initial value to start at<br> <br> adddipfield : float<br> additional dipole field to add<br> units : V/ang<br> External additive, constant electrostatic field along<br> third unit cell vector, corresponding to an external<br> dipole layer. The field discontinuity follows the position<br> of the dynamical dipole correction, i.e. if<br> DipoleCorrection:DipoleLayerPosition is set, the field<br> discontinuity is at this value, otherwise it is at the<br> vacuum position farthest from any other atoms on both<br> sides of the slab.<br> <br> position : float<br> scaled coordinates along third unit cell direction.<br> If this attribute is set, DACAPO will position the<br> compensation dipole layer plane in at the provided value.<br> If this attribute is not set, DACAPO will put the compensation<br> dipole layer plane in the vacuum position farthest from any<br> other atoms on both sides of the slab. Do not set this to<br> 0.0<br> <br> <br> calling <a href=“#Jacapo-set_dipole”>set_dipole</a>() sets all default values.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_dw”><strong>set_dw</strong></a>(self, dw)</dt><dd><tt>set the density wave cutoff energy.<br> <br> :Parameters:<br> <br> dw : integer<br> the density wave cutoff<br> <br> The function checks to make sure it is not less than the<br> planewave cutoff.<br> <br> Density_WaveCutoff describes the kinetic energy neccesary to<br> represent a wavefunction associated with the total density,<br> i.e. G-vectors for which $ert Gert^2$ $<$<br> 4*Density_WaveCutoff will be used to describe the total<br> density (including augmentation charge and partial core<br> density). If Density_WaveCutoff is equal to PlaneWaveCutoff<br> this implies that the total density is as soft as the<br> wavefunctions described by the kinetic energy cutoff<br> PlaneWaveCutoff. If a value of Density_WaveCutoff is specified<br> (must be larger than or equal to PlaneWaveCutoff) the program<br> will run using two grids, one for representing the<br> wavefunction density (softgrid_dim) and one representing the<br> total density (hardgrid_dim). If the density can be<br> reprensented on the same grid as the wavefunction density<br> Density_WaveCutoff can be chosen equal to PlaneWaveCutoff<br> (default).</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_electronic_minimization”><strong>set_electronic_minimization</strong></a>(self, method<font color=“#909090”>='eigsolve'</font>, diagsperband<font color=“#909090”>=2</font>)</dt><dd><tt>set the eigensolver method<br> <br> Selector for which subroutine to use for electronic<br> minimization<br> <br> Recognized options : “resmin”, “eigsolve” and “rmm-diis”.<br> <br> * “resmin” : Power method (Lennart Bengtson), can only handle<br> k-point parallization.<br> <br> * “eigsolve : Block Davidson algorithm<br> (Claus Bendtsen et al).<br> <br> * ”rmm-diis : Residual minimization<br> method (RMM), using DIIS (direct inversion in the iterate<br> subspace) The implementaion follows closely the algorithm<br> outlined in Kresse and Furthmuller, Comp. Mat. Sci, III.G/III.H<br> <br> :Parameters:<br> <br> method : string<br> should be 'resmin', 'eigsolve' or 'rmm-diis'<br> <br> diagsperband : int<br> The number of diagonalizations per band for<br> electronic minimization algorithms (maps onto internal<br> variable ndiapb). Applies for both<br> ElectronicMinimization:Method = “resmin” and “eigsolve”.<br> default value = 2</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_external_dipole”><strong>set_external_dipole</strong></a>(self, value, position<font color=“#909090”>=None</font>)</dt><dd><tt>Externally imposed dipole potential. This option overwrites<br> DipoleCorrection if set.<br> <br> :Parameters:<br> <br> value : float<br> units of volts<br> <br> position : float<br> scaled coordinates along third unit cell direction.<br> if None, the compensation dipole layer plane in the<br> vacuum position farthest from any other atoms on both<br> sides of the slab. Do not set to 0.0.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_extpot”><strong>set_extpot</strong></a>(self, potgrid)</dt><dd><tt>add external potential of value<br> <br> see this link before using this<br> https://listserv.fysik.dtu.dk/pipermail/campos/2003-August/000657.html<br> <br> :Parameters:<br> <br> potgrid : np.array with shape (nx,ny,nz)<br> the shape must be the same as the fft soft grid<br> the value of the potential to add<br> <br> <br> you have to know both of the fft grid dimensions ahead of time!<br> if you know what you are doing, you can set the fft_grid you want<br> before hand with:<br> calc.<a href=“#Jacapo-set_fftgrid”>set_fftgrid</a>1)</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_extracharge”><strong>set_extracharge</strong></a>(self, val)</dt><dd><tt>add extra charge to unit cell<br> <br> :Parameters:<br> <br> val : float<br> extra electrons to add or subtract from the unit cell<br> <br> Fixed extra charge in the unit cell (i.e. deviation from<br> charge neutrality). This assumes a compensating, positive<br> constant backgound charge (jellium) to forge overall charge<br> neutrality.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_fftgrid”><strong>set_fftgrid</strong></a>(self, soft<font color=“#909090”>=None</font>, hard<font color=“#909090”>=None</font>)</dt><dd><tt>sets the dimensions of the FFT grid to be used<br> <br> :Parameters:<br> <br> soft : (n1,n2,n3) integers<br> make a n1 x n2 x n3 grid<br> <br> hard : (n1,n2,n3) integers<br> make a n1 x n2 x n3 grid<br> <br> <br> >>> calc.<a href=“#Jacapo-set_fftgrid”>set_fftgrid</a>(soft=[42,44,46])<br> sets the soft and hard grid dimensions to 42,44,46<br> <br> >>> calc.<a href=“#Jacapo-set_fftgrid”>set_fftgrid</a>(soft=[42,44,46],hard=[80,84,88])<br> sets the soft grid dimensions to 42,44,46 and the hard<br> grid dimensions to 80,84,88<br> <br> These are the fast FFt grid numbers listed in fftdimensions.F<br> <br> data list_of_fft /2, 4, 6, 8, 10, 12, 14, 16, 18, 20, &<br> 22,24, 28, 30,32, 36, 40, 42, 44, 48, &<br> 56,60, 64, 66, 70, 72, 80, 84, 88, 90, &<br> 96,108,110,112,120,126,128,132,140,144,154, &<br> 160,168,176,180,192,198,200, &<br> 216,240,264,270,280,288,324,352,360,378,384,400,432, &<br> 450,480,540,576,640/<br> <br> otherwise you will get some errors from mis-dimensioned variables.<br> <br> this is usually automatically set by Dacapo.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_fixmagmom”><strong>set_fixmagmom</strong></a>(self, fixmagmom<font color=“#909090”>=None</font>)</dt><dd><tt>set a fixed magnetic moment for a spin polarized calculation<br> <br> :Parameters:<br> <br> fixmagmom : float<br> the magnetic moment of the cell in Bohr magnetons</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_ft”><strong>set_ft</strong></a>(self, ft)</dt><dd><tt>set the Fermi temperature for occupation smearing<br> <br> :Parameters:<br> <br> ft : float<br> Fermi temperature in kT (eV)<br> <br> Electronic temperature, corresponding to gaussian occupation<br> statistics. Device used to stabilize the convergence towards<br> the electronic ground state. Higher values stabilizes the<br> convergence. Values in the range 0.1-1.0 eV are recommended,<br> depending on the complexity of the Fermi surface (low values<br> for d-metals and narrow gap semiconducters, higher for free<br> electron-like metals).</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_kpts”><strong>set_kpts</strong></a>(self, kpts)</dt><dd><tt>set the kpt grid.<br> <br> Parameters:<br> <br> kpts: (n1,n2,n3) or [k1,k2,k3,…] or one of these<br> chadi-cohen sets:<br> <br> * cc6_1x1<br> * cc12_2x3<br> * cc18_sq3xsq3<br> * cc18_1x1<br> * cc54_sq3xsq3<br> * cc54_1x1<br> * cc162_sq3xsq3<br> * cc162_1x1<br> <br> (n1,n2,n3) creates an n1 x n2 x n3 monkhorst-pack grid,<br> [k1,k2,k3,…] creates a kpt-grid based on the kpoints<br> defined in k1,k2,k3,…<br> <br> There is also a possibility to have Dacapo (fortran) create<br> the Kpoints in chadi-cohen or monkhorst-pack form. To do this<br> you need to set the KpointSetup.gridtype attribute, and<br> KpointSetup.<br> <br> KpointSetup = [3,0,0]<br> KpointSetup.gridtype = 'ChadiCohen'<br> <br> KpointSetup(1) Chadi-Cohen k-point set<br> 1 6 k-points 1×1<br> 2 18-kpoints sqrt(3)*sqrt(3)<br> 3 18-kpoints 1×1<br> 4 54-kpoints sqrt(3)*sqrt(3)<br> 5 54-kpoints 1×1<br> 6 162-kpoints 1×1<br> 7 12-kpoints 2×3<br> 8 162-kpoints 3xsqrt 3<br> <br> or<br> KpointSetup = [4,4,4]<br> KpointSetup.gridtype = 'MonkhorstPack'<br> we do not use this functionality.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_mdos”><strong>set_mdos</strong></a>(self, mcenters<font color=“#909090”>=None</font>, energywindow<font color=“#909090”>=(-15, 5)</font>, energywidth<font color=“#909090”>=0.2</font>, numberenergypoints<font color=“#909090”>=250</font>, cutoffradius<font color=“#909090”>=1.0</font>)</dt><dd><tt>Setup multicentered projected DOS.<br> <br> mcenters<br> a list of tuples containing (atom#,l,m,weight)<br> (0,0,0,1.0) specifies (atom 0, l=0, m=0, weight=1.0) an s orbital<br> on atom 0<br> <br> (1,1,1,1.0) specifies (atom 1, l=1, m=1, weight=1.0) a p orbital<br> with m = +1 on atom 0<br> <br> l=0 s-orbital<br> l=1 p-orbital<br> l=2 d-orbital<br> <br> m in range of ( -l … 0 … +l )<br> <br> The direction cosines for which the spherical harmonics are<br> set up are using the next different atom in the list<br> (cyclic) as direction pointer, so the z-direction is chosen<br> along the direction to this next atom. At the moment the<br> rotation matrices is only given in the text file, you can<br> use grep'MUL: Rmatrix' out_o2.txt to get this information.<br> <br> adapated from old MultiCenterProjectedDOS.py</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_nbands”><strong>set_nbands</strong></a>(self, nbands<font color=“#909090”>=None</font>)</dt><dd><tt>Set the number of bands. a few unoccupied bands are<br> recommended.<br> <br> :Parameters:<br> <br> nbands : integer<br> the number of bands.<br> <br> if nbands = None the function returns with nothing done. At<br> calculate time, if there are still no bands, they will be set<br> by:<br> <br> the number of bands is calculated as<br> $nbands=nvalence*0.65 + 4$</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_nc”><strong>set_nc</strong></a>(self, nc<font color=“#909090”>='out.nc'</font>)</dt><dd><tt>set filename for the netcdf and text output for this calculation<br> <br> :Parameters:<br> <br> nc : string<br> filename for netcdf file<br> <br> if the ncfile attached to the calculator is changing, the old<br> file will be copied to the new file if it doesn not exist so<br> that all the calculator details are preserved. Otherwise, the<br> <br> if the ncfile does not exist, it will get initialized.<br> <br> the text file will have the same basename as the ncfile, but<br> with a .txt extension.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_ncoutput”><strong>set_ncoutput</strong></a>(self, wf<font color=“#909090”>=None</font>, cd<font color=“#909090”>=None</font>, efp<font color=“#909090”>=None</font>, esp<font color=“#909090”>=None</font>)</dt><dd><tt>set the output of large variables in the netcdf output file<br> <br> :Parameters:<br> <br> wf : string<br> controls output of wavefunction. values can<br> be 'Yes' or 'No'<br> <br> cd : string<br> controls output of charge density. values can<br> be 'Yes' or 'No'<br> <br> efp : string<br> controls output of effective potential. values can<br> be 'Yes' or 'No'<br> <br> esp : string<br> controls output of electrostatic potential. values can<br> be 'Yes' or 'No'</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_occupationstatistics”><strong>set_occupationstatistics</strong></a>(self, method)</dt><dd><tt>set the method used for smearing the occupations.<br> <br> :Parameters:<br> <br> method : string<br> one of 'FermiDirac' or 'MethfesselPaxton'<br> Currently, the Methfessel-Paxton scheme (PRB 40, 3616 (1989).)<br> is implemented to 1th order (which is recommemded by most authors).<br> 'FermiDirac' is the default</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_parent”><strong>set_parent</strong></a>(self, parent)</dt></dl>
<dl><dt><a name=“Jacapo-set_pseudopotentials”><strong>set_pseudopotentials</strong></a>(self, pspdict)</dt><dd><tt>Set all the pseudopotentials from a dictionary.<br> <br> The dictionary should have this form::<br> <br> {symbol1: path1,<br> symbol2: path2}</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_psp”><strong>set_psp</strong></a>(self, sym<font color=“#909090”>=None</font>, z<font color=“#909090”>=None</font>, psp<font color=“#909090”>=None</font>)</dt><dd><tt>set the pseudopotential file for a species or an atomic number.<br> <br> :Parameters:<br> <br> sym : string<br> chemical symbol of the species<br> <br> z : integer<br> the atomic number of the species<br> <br> psp : string<br> filename of the pseudopotential<br> <br> <br> you can only set sym or z.<br> <br> examples::<br> <br> <a href=“#Jacapo-set_psp”>set_psp</a>('N',psp='pspfile')<br> <a href=“#Jacapo-set_psp”>set_psp</a>(z=6,psp='pspfile')</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_psp_database”><strong>set_psp_database</strong></a>(self, xc<font color=“#909090”>=None</font>)</dt><dd><tt>get the xc-dependent psp database<br> <br> :Parameters:<br> <br> xc : string<br> one of 'PW91', 'PBE', 'revPBE', 'RPBE', 'PZ'<br> <br> <br> not all the databases are complete, and that means<br> some psp do not exist.<br> <br> note: this function is not supported fully. only pw91 is<br> imported now. Changing the xc at this point results in loading<br> a nearly empty database, and I have not thought about how to<br> resolve that</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_pw”><strong>set_pw</strong></a>(self, pw)</dt><dd><tt>set the planewave cutoff.<br> <br> :Parameters:<br> <br> pw : integer<br> the planewave cutoff in eV<br> <br> this function checks to make sure the density wave cutoff is<br> greater than or equal to the planewave cutoff.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_spinpol”><strong>set_spinpol</strong></a>(self, spinpol<font color=“#909090”>=False</font>)</dt><dd><tt>set Spin polarization.<br> <br> :Parameters:<br> <br> spinpol : Boolean<br> <a href=“#Jacapo-set_spinpol”>set_spinpol</a>(True) spin-polarized.<br> <a href=“#Jacapo-set_spinpol”>set_spinpol</a>(False) no spin polarization, default<br> <br> Specify whether to perform a spin polarized or unpolarized<br> calculation.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_status”><strong>set_status</strong></a>(self, status)</dt><dd><tt>set the status flag in the netcdf file<br> <br> :Parameters:<br> <br> status : string<br> status flag, e.g. 'new', 'finished'</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_stay_alive”><strong>set_stay_alive</strong></a>(self, value)</dt><dd><tt>set the stay alive setting</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_symmetry”><strong>set_symmetry</strong></a>(self, val<font color=“#909090”>=False</font>)</dt><dd><tt>set how symmetry is used to reduce k-points<br> <br> :Parameters:<br> <br> val : Boolean<br> set_sym(True) Maximum symmetry is used<br> set_sym(False) No symmetry is used<br> <br> This variable controls the if and how DACAPO should attempt<br> using symmetry in the calculation. Imposing symmetry generally<br> speeds up the calculation and reduces numerical noise to some<br> extent. Symmetry should always be applied to the maximum<br> extent, when ions are not moved. When relaxing ions, however,<br> the symmetry of the equilibrium state may be lower than the<br> initial state. Such an equilibrium state with lower symmetry<br> is missed, if symmetry is imposed. Molecular dynamics-like<br> algorithms for ionic propagation will generally not break the<br> symmetry of the initial state, but some algorithms, like the<br> BFGS may break the symmetry of the initial state. Recognized<br> options:<br> <br> “Off”: No symmetry will be imposed, apart from time inversion<br> symmetry in recipical space. This is utilized to reduce the<br> k-point sampling set for Brillouin zone integration and has no<br> influence on the ionic forces/motion.<br> <br> “Maximum”: DACAPO will look for symmetry in the supplied<br> atomic structure and extract the highest possible symmetry<br> group. During the calculation, DACAPO will impose the found<br> spatial symmetry on ionic forces and electronic structure,<br> i.e. the symmetry will be conserved during the calculation.</tt></dd></dl>
<dl><dt><a name=“Jacapo-set_xc”><strong>set_xc</strong></a>(self, xc)</dt><dd><tt>Set the self-consistent exchange-correlation functional<br> <br> :Parameters:<br> <br> xc : string<br> Must be one of 'PZ', 'VWN', 'PW91', 'PBE', 'revPBE', 'RPBE'<br> <br> Selects which density functional to use for<br> exchange-correlation when performing electronic minimization<br> (the electronic energy is minimized with respect to this<br> selected functional) Notice that the electronic energy is also<br> evaluated non-selfconsistently by DACAPO for other<br> exchange-correlation functionals Recognized options :<br> <br> * “PZ” (Perdew Zunger LDA-parametrization)<br> * “VWN” (Vosko Wilk Nusair LDA-parametrization)<br> * “PW91” (Perdew Wang 91 GGA-parametrization)<br> * “PBE” (Perdew Burke Ernzerhof GGA-parametrization)<br> * “revPBE” (revised PBE/1 GGA-parametrization)<br> * “RPBE” (revised PBE/2 GGA-parametrization)<br> <br> option “PZ” is not allowed for spin polarized<br> calculation; use “VWN” instead.</tt></dd></dl>
<dl><dt><a name=“Jacapo-strip”><strong>strip</strong></a>(self)</dt><dd><tt>remove all large memory nc variables not needed for<br> anything I use very often.</tt></dd></dl>
<dl><dt><a name=“Jacapo-update_input_parameters”><strong>update_input_parameters</strong></a>(self)</dt><dd><tt>read in all the input parameters from the netcdfile</tt></dd></dl>
<dl><dt><a name=“Jacapo-write”><strong>write</strong></a>(self, new<font color=“#909090”>=False</font>)</dt><dd><tt>write out everything to the ncfile : <a href=“#Jacapo-get_nc”>get_nc</a>()<br> <br> new determines whether to delete any existing ncfile, and rewrite it.</tt></dd></dl>
<dl><dt><a name=“Jacapo-write_input”><strong>write_input</strong></a>(self)</dt><dd><tt>write out input parameters as needed<br> <br> you must define a self.<strong>_set_keyword</strong> function that does all the<br> actual writing.</tt></dd></dl>
<dl><dt><a name=“Jacapo-write_nc”><strong>write_nc</strong></a>(self, nc<font color=“#909090”>=None</font>, atoms<font color=“#909090”>=None</font>)</dt><dd><tt>write out atoms to a netcdffile.<br> <br> This does not write out the calculation parameters!<br> <br> :Parameters:<br> <br> nc : string<br> ncfilename to write to. this file will get clobbered<br> if it already exists.<br> <br> atoms : ASE.Atoms<br> atoms to write. if None use the attached atoms<br> if no atoms are attached only the calculator is<br> written out.<br> <br> the ncfile is always opened in 'a' mode.<br> <br> note: it is good practice to use the atoms argument to make<br> sure that the geometry you mean gets written! Otherwise, the<br> atoms in the calculator is used, which may be different than<br> the external copy of the atoms.</tt></dd></dl>
<hr> Static methods defined here:<br> <dl><dt><a name=“Jacapo-read_atoms”><strong>read_atoms</strong></a>(filename)</dt><dd><tt>read atoms and calculator from an existing netcdf file.<br> <br> :Parameters:<br> <br> filename : string<br> name of file to read from.<br> <br> static method<br> <br> example::<br> <br> >>> atoms = <a href=“#Jacapo”>Jacapo</a>.<a href=“#Jacapo-read_atoms”>read_atoms</a>(ncfile)<br> >>> calc = atoms.get_calculator()<br> <br> this method is here for legacy purposes. I used to use it alot.</tt></dd></dl>
<hr> Data and other attributes defined here:<br> <dl><dt><strong>version</strong> = '0.4'</dt></dl>
<dl><dt><strong>default_input</strong> = {'ados': None, 'ascii_debug': 'Off', 'atoms': None, 'calculate_stress': False, 'charge_mixing': {'method': 'Pulay', 'mixingcoeff': 0.1, 'mixinghistory': 10, 'precondition': 'No', 'updatecharge': 'Yes'}, 'convergence': {'density': 0.0001, 'energy': 1e-05, 'maxsteps': None, 'maxtime': None, 'occupation': 0.001}, 'decoupling': None, 'dipole': {'adddipfield': 0.0, 'initval': 0.0, 'mixpar': 0.2, 'position': None, 'status': False}, 'dw': 350, 'electronic_minimization': {'diagsperband': 2, 'method': 'eigsolve'}, …}</dt></dl>
</td></tr></tbody></table></p></td></tr></tbody></table></p><p> <table summary=“section” border=“0” cellpadding=“2” cellspacing=“0” width=“100%”> <tbody>
<tr><td> </td> <td width=“100%”><dl><dt><a name=“-read”><strong>read</strong></a>(ncfile)</dt><dd><tt>return atoms and calculator from ncfile<br> <br> >>> atoms, calc = <a href=“#-read”>read</a>('co.nc')</tt></dd></dl> </td></tr></tbody></table></p><p><br> </p></body></html>