info:dacapo
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
info:dacapo [2018/04/28 15:58] – kimi | info:dacapo [2022/08/23 13:34] (現在) – 外部編集 127.0.0.1 | ||
---|---|---|---|
行 3: | 行 3: | ||
[[ase: | [[ase: | ||
- | [[http://192.168.10.213/ | + | [[http://sstweb.ee.ous.ac.jp/ |
===== functions ===== | ===== functions ===== | ||
行 22: | 行 22: | ||
==== Constractor ==== | ==== Constractor ==== | ||
+ | ==== Jacapo ==== | ||
<code python> | <code python> | ||
__init__(self, | __init__(self, | ||
行 44: | 行 45: | ||
|'' | |'' | ||
|'' | |'' | ||
- | | |// | + | | ::: |// |
{' | {' | ||
' | ' | ||
行 51: | 行 52: | ||
' | ' | ||
|'' | |'' | ||
- | |'' | + | |'' |
- | + | |'' | |
- | | + | |'' |
- | | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | ||
- | Methods | ||
- | |||
- | |||
- | Methods defined here: | ||
Initialize the Jacapo calculator | Initialize the Jacapo calculator | ||
- | |||
- | |||
Modification of the nc file only occurs at calculate time if needed | Modification of the nc file only occurs at calculate time if needed | ||
- | + | <code python> | |
>>> | >>> | ||
- | + | </ | |
reads the calculator from CO.nc if it exists or | reads the calculator from CO.nc if it exists or | ||
minimally initializes CO.nc with dimensions if it does not exist. | minimally initializes CO.nc with dimensions if it does not exist. | ||
- | + | <code python> | |
>>> | >>> | ||
- | + | </ | |
reads the calculator from CO.nc or initializes it if | reads the calculator from CO.nc or initializes it if | ||
it does not exist and changes the planewave cutoff energy to | it does not exist and changes the planewave cutoff energy to | ||
300eV | 300eV | ||
- | + | <code python> | |
>>> | >>> | ||
- | + | </ | |
returns the atoms in the netcdffile CO.nc, with the calculator | returns the atoms in the netcdffile CO.nc, with the calculator | ||
attached to it. | attached to it. | ||
- | + | <code python> | |
>>> | >>> | ||
+ | </ | ||
+ | |||
+ | ==== __str__ ==== | ||
__str__(self) | __str__(self) | ||
pretty-print the calculator and atoms. | pretty-print the calculator and atoms. | ||
行 94: | 行 84: | ||
we read everything directly from the ncfile to prevent | we read everything directly from the ncfile to prevent | ||
triggering any calculations | triggering any calculations | ||
+ | |||
+ | ==== atoms_are_equal ==== | ||
+ | |||
atoms_are_equal(self, | atoms_are_equal(self, | ||
comparison of atoms to self.atoms using tolerances to account | comparison of atoms to self.atoms using tolerances to account | ||
for float/ | for float/ | ||
+ | ==== attach_child ==== | ||
+ | |||
attach_child(self, | attach_child(self, | ||
+ | |||
+ | ==== calculate ==== | ||
+ | |||
calculate(self) | calculate(self) | ||
run a calculation. | run a calculation. | ||
行 105: | 行 103: | ||
required. It is assumed here that if you call this, you mean | required. It is assumed here that if you call this, you mean | ||
it. | it. | ||
+ | |||
+ | ==== calculation_required ==== | ||
calculation_required(self, | calculation_required(self, | ||
determines if a calculation is needed. | determines if a calculation is needed. | ||
行 112: | 行 112: | ||
quantities is here because of the ase interface. | quantities is here because of the ase interface. | ||
+ | ==== delete_ncattdimvar ---- | ||
delete_ncattdimvar(self, | delete_ncattdimvar(self, | ||
helper function to delete attributes, | helper function to delete attributes, | ||
行 123: | 行 124: | ||
if you delete a dimension, all variables with that dimension | if you delete a dimension, all variables with that dimension | ||
are also deleted. | are also deleted. | ||
+ | ==== execute_external_dynamics ==== | ||
execute_external_dynamics(self, | execute_external_dynamics(self, | ||
Implementation of the stay alive functionality with socket | Implementation of the stay alive functionality with socket | ||
行 129: | 行 131: | ||
from the same python process, since the python PID is used as | from the same python process, since the python PID is used as | ||
identifier for the script[PID].py file. | identifier for the script[PID].py file. | ||
+ | ==== execute_parent_calculation ==== | ||
execute_parent_calculation(self) | execute_parent_calculation(self) | ||
Implementation of an extra level of parallelization, | Implementation of an extra level of parallelization, | ||
dacapo.run processes. This is used for NEBs parallelized over images. | dacapo.run processes. This is used for NEBs parallelized over images. | ||
+ | ==== get_ados ==== | ||
+ | <code python> | ||
get_ados(self, | get_ados(self, | ||
+ | </ | ||
attempt at maintaining backward compatibility with get_ados | attempt at maintaining backward compatibility with get_ados | ||
returning data | returning data | ||
行 139: | 行 145: | ||
and calc.get_ados(atoms=[], | and calc.get_ados(atoms=[], | ||
+ | |||
+ | ==== get_ados_data ==== | ||
+ | |||
+ | |||
get_ados_data(self, | get_ados_data(self, | ||
get atom projected data | get atom projected data | ||
行 163: | 行 173: | ||
returns (egrid, ados) | returns (egrid, ados) | ||
egrid has the fermi level at 0 eV | egrid has the fermi level at 0 eV | ||
+ | ==== get_all_eigenvalues ==== | ||
get_all_eigenvalues(self, | get_all_eigenvalues(self, | ||
return all the eigenvalues at all the kpoints for a spin. | return all the eigenvalues at all the kpoints for a spin. | ||
行 170: | 行 181: | ||
spin : integer | spin : integer | ||
which spin the eigenvalues are for | which spin the eigenvalues are for | ||
+ | ==== get_ascii_debug ==== | ||
get_ascii_debug(self) | get_ascii_debug(self) | ||
Return the debug settings in Dacapo | Return the debug settings in Dacapo | ||
+ | ==== get_atoms ==== | ||
get_atoms(self) | get_atoms(self) | ||
return the atoms attached to a calculator() | return the atoms attached to a calculator() | ||
+ | ==== get_bz_k_points ==== | ||
get_bz_k_points(self) | get_bz_k_points(self) | ||
return list of kpoints in the Brillouin zone | return list of kpoints in the Brillouin zone | ||
+ | ==== get_calculate_stress ==== | ||
get_calculate_stress(self) | get_calculate_stress(self) | ||
return whether stress is calculated or not | return whether stress is calculated or not | ||
+ | ==== get_cd ==== | ||
get_cd = get_charge_density(self, | get_cd = get_charge_density(self, | ||
+ | ==== get_charge_density ==== | ||
get_charge_density(self, | get_charge_density(self, | ||
return x, | return x, | ||
行 193: | 行 210: | ||
ChargeDensity: | ChargeDensity: | ||
ChargeDensity: | ChargeDensity: | ||
+ | === get_charge_mixing ==== | ||
get_charge_mixing(self) | get_charge_mixing(self) | ||
return charge mixing parameters | return charge mixing parameters | ||
+ | ==== get_convergence ==== | ||
get_convergence(self) | get_convergence(self) | ||
return convergence settings for Dacapo | return convergence settings for Dacapo | ||
+ | ==== get_debug ==== | ||
get_debug(self) | get_debug(self) | ||
Return the python logging level | Return the python logging level | ||
+ | ==== get_decoupling ==== | ||
get_decoupling(self) | get_decoupling(self) | ||
return the electrostatic decoupling parameters | return the electrostatic decoupling parameters | ||
+ | ==== get_dipole ==== | ||
get_dipole(self) | get_dipole(self) | ||
return dictionary of parameters if the DipoleCorrection was used | return dictionary of parameters if the DipoleCorrection was used | ||
+ | ==== get_dipole_moment ==== | ||
get_dipole_moment(self, | get_dipole_moment(self, | ||
return dipole moment of unit cell | return dipole moment of unit cell | ||
行 237: | 行 260: | ||
minimization algorithms | minimization algorithms | ||
get_electronic_temperature = get_ft(self) | get_electronic_temperature = get_ft(self) | ||
+ | ==== get_electrostatic_potential ==== | ||
get_electrostatic_potential(self, | get_electrostatic_potential(self, | ||
get electrostatic potential | get electrostatic potential | ||
行 249: | 行 273: | ||
| | ||
unit = " | unit = " | ||
+ | ==== get_ensemble_coefficients ==== | ||
get_ensemble_coefficients(self) | get_ensemble_coefficients(self) | ||
returns exchange correlation ensemble coefficients | returns exchange correlation ensemble coefficients | ||
+ | ==== get_esp ==== | ||
get_esp = get_electrostatic_potential(self, | get_esp = get_electrostatic_potential(self, | ||
get_external_dipole(self) | get_external_dipole(self) | ||
return the External dipole settings | return the External dipole settings | ||
+ | ==== get_extpot ==== | ||
get_extpot(self) | get_extpot(self) | ||
return the external potential set in teh calculator | return the external potential set in teh calculator | ||
+ | ==== get_extracharge ==== | ||
get_extracharge(self) | get_extracharge(self) | ||
Return the extra charge set in teh calculator | Return the extra charge set in teh calculator | ||
+ | ==== get_fermi_level ==== | ||
get_fermi_level(self) | get_fermi_level(self) | ||
return Fermi level | return Fermi level | ||
+ | ==== get_fftgrid ==== | ||
get_fftgrid(self) | get_fftgrid(self) | ||
return soft and hard fft grids | return soft and hard fft grids | ||
+ | ==== get_fixmagmom ==== | ||
get_fixmagmom(self) | get_fixmagmom(self) | ||
returns the value of FixedMagneticMoment | returns the value of FixedMagneticMoment | ||
+ | ==== get_forces | ||
get_forces(self, | get_forces(self, | ||
Calculate atomic forces | Calculate atomic forces | ||
+ | ==== get_ft ==== | ||
get_ft(self) | get_ft(self) | ||
return the FermiTemperature used in the calculation | return the FermiTemperature used in the calculation | ||
+ | ==== get_ibz_k_points ==== | ||
get_ibz_k_points = get_ibz_kpoints(self) | get_ibz_k_points = get_ibz_kpoints(self) | ||
+ | ==== get_ibz_kpoints ==== | ||
get_ibz_kpoints(self) | get_ibz_kpoints(self) | ||
return list of kpoints in the irreducible brillouin zone | return list of kpoints in the irreducible brillouin zone | ||
+ | ==== get_k_point_weights ==== | ||
get_k_point_weights(self) | get_k_point_weights(self) | ||
return the weights on the IBZ kpoints | return the weights on the IBZ kpoints | ||
+ | ==== get_kpts ==== | ||
get_kpts(self) | get_kpts(self) | ||
return the BZ kpts | return the BZ kpts | ||
+ | ==== get_kpts_type ==== | ||
get_kpts_type(self) | get_kpts_type(self) | ||
return the kpt grid type | return the kpt grid type | ||
+ | ==== get_magnetic_moment ==== | ||
get_magnetic_moment(self, | get_magnetic_moment(self, | ||
calculates the magnetic moment (Bohr-magnetons) of the supercell | calculates the magnetic moment (Bohr-magnetons) of the supercell | ||
+ | ==== get_magnetic_moments ==== | ||
get_magnetic_moments(self, | get_magnetic_moments(self, | ||
return magnetic moments on each atom after the calculation is | return magnetic moments on each atom after the calculation is | ||
run | run | ||
+ | ==== get_mdos ==== | ||
get_mdos(self) | get_mdos(self) | ||
return multicentered projected dos parameters | return multicentered projected dos parameters | ||
+ | ==== get_mdos_data==== | ||
get_mdos_data(self, | get_mdos_data(self, | ||
returns data from multicentered projection | returns data from multicentered projection | ||
行 297: | 行 339: | ||
center on the atom# for label. I do not not know what the | center on the atom# for label. I do not not know what the | ||
label refers to. | label refers to. | ||
+ | ==== get_nbands ==== | ||
get_nbands(self) | get_nbands(self) | ||
return the number of bands used in the calculation | return the number of bands used in the calculation | ||
行 498: | 行 541: | ||
atoms | atoms | ||
ASE.Atoms instance | ASE.Atoms instance | ||
+ | ==== set_calculate_stress ==== | ||
set_calculate_stress(self, | set_calculate_stress(self, | ||
Turn on stress calculation | Turn on stress calculation | ||
行 506: | 行 550: | ||
set_calculate_stress(True) calculates stress | set_calculate_stress(True) calculates stress | ||
set_calculate_stress(False) do not calculate stress | set_calculate_stress(False) do not calculate stress | ||
+ | ==== set_charge_mixing ==== | ||
set_charge_mixing(self, | set_charge_mixing(self, | ||
set density mixing method and parameters | set density mixing method and parameters | ||
行 546: | 行 591: | ||
This setting is useful when evaluating the Harris-Foulkes | This setting is useful when evaluating the Harris-Foulkes | ||
| | ||
+ | ==== set_convergence ==== | ||
set_convergence(self, | set_convergence(self, | ||
set convergence criteria for stopping the dacapo calculator. | set convergence criteria for stopping the dacapo calculator. | ||
行 567: | 行 613: | ||
Autopilot not supported here. | Autopilot not supported here. | ||
+ | ==== set_debug ==== | ||
set_debug(self, | set_debug(self, | ||
set debug level for python logging | set debug level for python logging | ||
行 572: | 行 619: | ||
debug should be an integer from 0-100 or one of the logging | debug should be an integer from 0-100 or one of the logging | ||
constants like logging.DEBUG, | constants like logging.DEBUG, | ||
+ | ==== set_decoupling ==== | ||
set_decoupling(self, | set_decoupling(self, | ||
Decoupling activates the three dimensional electrostatic | Decoupling activates the three dimensional electrostatic | ||
行 592: | 行 640: | ||
The width of the Gaussians defined by | The width of the Gaussians defined by | ||
$widthofgaussian*1.5^(n-1)$ | $widthofgaussian*1.5^(n-1)$ | ||
+ | ==== set_dipole ==== | ||
set_dipole(self, | set_dipole(self, | ||
turn on and set dipole correction scheme | turn on and set dipole correction scheme | ||
行 632: | 行 681: | ||
calling set_dipole() sets all default values. | calling set_dipole() sets all default values. | ||
+ | ==== set_dw ==== | ||
set_dw(self, | set_dw(self, | ||
set the density wave cutoff energy. | set the density wave cutoff energy. | ||
行 659: | 行 709: | ||
Density_WaveCutoff can be chosen equal to PlaneWaveCutoff | Density_WaveCutoff can be chosen equal to PlaneWaveCutoff | ||
(default). | (default). | ||
+ | ==== set_electronic_minimization ==== | ||
set_electronic_minimization(self, | set_electronic_minimization(self, | ||
set the eigensolver method | set the eigensolver method | ||
行 689: | 行 740: | ||
ElectronicMinimization: | ElectronicMinimization: | ||
default value = 2 | default value = 2 | ||
+ | ==== set_external_dipole ==== | ||
set_external_dipole(self, | set_external_dipole(self, | ||
Externally imposed dipole potential. This option overwrites | Externally imposed dipole potential. This option overwrites | ||
行 703: | 行 755: | ||
vacuum position farthest from any other atoms on both | vacuum position farthest from any other atoms on both | ||
sides of the slab. Do not set to 0.0. | sides of the slab. Do not set to 0.0. | ||
+ | ==== set_extpot ==== | ||
set_extpot(self, | set_extpot(self, | ||
add external potential of value | add external potential of value | ||
行 720: | 行 773: | ||
before hand with: | before hand with: | ||
calc.set_fftgrid((n1, | calc.set_fftgrid((n1, | ||
+ | ==== set_extracharge ==== | ||
set_extracharge(self, | set_extracharge(self, | ||
add extra charge to unit cell | add extra charge to unit cell | ||
行 732: | 行 786: | ||
constant backgound charge (jellium) to forge overall charge | constant backgound charge (jellium) to forge overall charge | ||
neutrality. | neutrality. | ||
+ | ==== set_fftgrid | ||
set_fftgrid(self, | set_fftgrid(self, | ||
sets the dimensions of the FFT grid to be used | sets the dimensions of the FFT grid to be used | ||
行 764: | 行 819: | ||
this is usually automatically set by Dacapo. | this is usually automatically set by Dacapo. | ||
+ | ==== set_fixmagmom | ||
set_fixmagmom(self, | set_fixmagmom(self, | ||
set a fixed magnetic moment for a spin polarized calculation | set a fixed magnetic moment for a spin polarized calculation | ||
行 771: | 行 827: | ||
fixmagmom : float | fixmagmom : float | ||
the magnetic moment of the cell in Bohr magnetons | the magnetic moment of the cell in Bohr magnetons | ||
+ | ==== set_ft | ||
set_ft(self, | set_ft(self, | ||
set the Fermi temperature for occupation smearing | set the Fermi temperature for occupation smearing | ||
行 786: | 行 843: | ||
for d-metals and narrow gap semiconducters, | for d-metals and narrow gap semiconducters, | ||
electron-like metals). | electron-like metals). | ||
+ | ==== set_kpts ==== | ||
set_kpts(self, | set_kpts(self, | ||
set the kpt grid. | set the kpt grid. | ||
行 869: | 行 927: | ||
the number of bands is calculated as | the number of bands is calculated as | ||
$nbands=nvalence*0.65 + 4$ | $nbands=nvalence*0.65 + 4$ | ||
+ | ==== set_nc | ||
=== set_nc(self, | === set_nc(self, | ||
行 886: | 行 945: | ||
the text file will have the same basename as the ncfile, but | the text file will have the same basename as the ncfile, but | ||
with a .txt extension. | with a .txt extension. | ||
+ | ==== set_ncoutput ==== | ||
=== set_ncoutput(self, | === set_ncoutput(self, | ||
行 925: | 行 985: | ||
{symbol1: path1, | {symbol1: path1, | ||
| | ||
+ | ==== set_psp ==== | ||
+ | |||
=== set_psp(self, | === set_psp(self, | ||
行 1071: | 行 1133: | ||
you must define a self._set_keyword function that does all the | you must define a self._set_keyword function that does all the | ||
actual writing. | actual writing. | ||
- | |||
- | |||
==== write_nc ==== | ==== write_nc ==== | ||
info/dacapo.1524898710.txt.gz · 最終更新: 2022/08/23 13:34 (外部編集)