入力ファイルのサブセクション

File format

CrySPY uses the configparser module to read input file, cryspy.in . cryspy.in consists of sections, led by a [section] header and followed by name = value or name : value entries. Section names and values are case sensitive, but names are not. Lines beginning with # or ; are ignored and may be used to provide comments. Accepted bool values are 1, yes, true, and on, which cause this method to return True, and 0, no, false, and off, which cause it to return False. These string values for bool are checked in a case-insensitive manner. Some values are given in a space-separated manner.

情報

See configparser in detail.

メモ

section name: case sensitive
name: case insensitive
value: case sensitive except for bool

[basic] section

NameValueDefaultDescription
algoRS, EA, BO, LAQAAlgorithm
calc_codeVASP, QE, OMX, soiap, LAMMPSCaluculation code for structure optimization
tot_strucintThe total number of structures
nstageintThe number of stages
njobintThe number of jobs running at the same time.
jobcmdstrCommand to submit jobs such as qsub and sbatch.
jobfilestrFile name of the job file.

[structure] section

2024 May 22, updated

NameValueDefaultDescription
struc_modecrystal, mol, mol_bscrystalStructure generation mode
natotintThe total number of atoms.
atypeatomic symbol [atomic symbol …]Atom type. e.g. atype = Na Cl.
natint [int …]The number of atoms in each atom type. e.g. nat = 8 8.
mindist (mindist_?)float [float …]NoneConstraint on minimum interatomic distance [Å].
mindist_factorfloat1.0Scaling factor for mindist.
vol_factorfloat1.0Minimum and maximum values of volume factor.
vol_mufloatNoneMean of volume if you want specify the volume of cells.
vol_sigmafloatNoneStandard deviation of volume if you want specify the volume of cells.
symprecfloat0.01Precision for symmetry finding.
spgnumall, space group number, 0allConstraint on space group. If all, 1–230. If 0, random structure without space group information (no symmetry).
use_find_wyboolFalseStructure generation with find_wy.

mindist


if algo is EA-vc (EA-vc is still beta version)

NameValueDefaultDescription
ll_natint [int …]Lower limit of nat. e.g. ll_nat = 1 1.
ul_natint [int …]Upper limit of nat. e.g. ul_nat = 8 8.

if struc_mode is mol or mol_bs

NameValueDefaultDescription
mol_filestr [str …]Path of molecule files or molecule names.
nmolint [int …]The number of molecules.
timeout_molfloatNoneTime out for molecular structure generation.
rot_molrandom, random_mol, random_wyckoffrandom_wyckoffOnly used in mol_bs. Mode for rotation of molecules.
nrotint20Only used in mol_bs. Maximum number of trials to rotate molecules.
mindist_mol_bs (mindist_mol_bs_?)float [float …]NoneOnly used in mol_bs. Constraint on minimum intermolecular distance [Å].
mindist_mol_bs_factorfloat1.0Only used in mol_bs. Scaling factor for mindist_mol_bs.

if use_find_wy is True or spgnum = 0

NameValueDefaultDescription
fwpathstrNoneOnly used with find_wy. Path of find_wy. If None, fwpath is automatically searched in your $PATH.
minlenfloatOnly used with find_wy or spgnum = 0. Minimum length of lattice vector [Å].
maxlenfloatOnly used with find_wy or spgnum = 0. Maximum length of lattice vector [Å].
danglefloatOnly used with find_wy or spgnum = 0. Delta angle for alpha, beta, and gamma in degree unit.
maxcntint50Only used with find_wy or spgnum = 0. Maximum number of trials to determine atom positions.

[VASP] section

VASPを使う場合は(calc_code = VASP)[VASP]セクションが必要になる.

NameValueDefaultDescription
kppvolint [int …]各ステージにおける逆格子空間でのÅ**(-3)あたりのグリッド密度.
force_gammaboolFalseTrueなら常にガンマ点を通るメッシュを使う.

kppvol and force gamma

[QE] section

[QE] section is required only if you use QE (calc_code = QE)

NameValueDefaultDescription
kppvolint [int …]Grid density per Å**(-3) of reciprocal cell in each stage
qe_infilestrFile name of QE input file.
qe_outfilestrFile name of QE output file.
pv_termboolFalseIf true, read enthalpy instead of total energy.

kppvol

pv_term

[OMX] section

[OMX] section is required only if you use OpenMX (calc_code = OMX)

NameValueDefaultDescription
kppvolint [int …]Grid density per Å**(-3) of reciprocal cell in each stage
OMX_infilestrFile name of OpenMX input file.
OMX_outfilestrFile name of OpenMX output file.
ValenceElectronsstr float float [str float float …]The number of initial charges for up and down spin states.

kppvol

ValenceElectrons

e.g. in NaCl: ValenceElectrons = Na 4.5 4.5 Cl 3.5 3.5.

[soaip] section

[soiap] section is required only if you use soiap (calc_code = soiap)

NameValueDefaultDescription
soiap_infilestrFile name of soiap input file.
soiap_outfilestrFile name of soiap output file.
soiap_cifstrFile name of soiap CIF-formatted initial structure.

[LAMMPS] section

[LAMMPS] section is required only if you use LAMMPS (calc_code = LAMMPS)

NameValueDefaultDescription
lammps_infilestrFile name of LAMMPS input file.
lammps_outfilestrFile name of LAMMPS output file.
lammps_potentialstr [str …], NoneNonePotential.
lammps_datastrFile name of LAMMPS data file.

[ASE] section

[ASE] section is required only if you use ASE (calc_code = ASE)

NameValueDefaultDescription
ase_pythonstrFile name of ASE input file.

[EA] section

2024年5月22日 更新

[EA] section is required only if you use EA (algo = EA)

NameValueDefaultDescription
n_popintPopulation from second generation.
n_crsovintNumber of structures generated by crossover.
n_permintNumber of structures generated by permutation.
n_strainintNumber of structures generated by strain.
n_randintNumber of structures generated randomly.
n_eliteintNumber of elite structures.
fit_reverseboolFalseIf False, minimal search.
n_fittestintNoneNumber of structures which can survive.
slct_funcTNM, RLTSelect function.
t_sizeint3Only used with slct_func = TNM. Tournament size.
a_rltfloat10.0Only used with slct_func = RLT. Parameter for linear scaling.
b_rltfloat1.0Only used with slct_func = RLT. Parameter for linear scaling.
crs_latequal, randomrandomHow to mix lattice vectors.
nat_diff_toleint4Tolerance for difference in the number of atoms in crossover.
ntimesint1Number of times in permutation.
sigma_stfloat0.5Standard deviation for strain.
maxcnt_eaint50Maximum number of trials in EA.
maxgen_eaint0Maximum generation.
emax_eafloatNoneUpper limit of energy in selecting parents.
emin_eafloatNoneLower limit of energy in selecting parents.

if algo is EA-vc

NameValueDefaultDescription
n_addintNumber of structures generated by addition.
n_elimintNumber of structures generated by elimination.
n_subsintNumber of structures generated by substitution.
targetstrrandomTarget. only random for now.
end_pointfloat, floatEnergy of end points for convex hull.

[BO] section

2024 May 27th, updated

[BO] section is required only if you use BO (algo = BO)

NameValueDefaultDescription
nselect_bointThe number of structures to be selected at once.
scoreTS, EI, PIAcquisition function.
num_rand_basisint0If 0, Gaussian process. The number of basis function.
cdevfloat0.001Cutoff of deviation for standardization.
dscrptFPStructure descriptor.
max_select_boint0Maximum number of selection.
manual_select_boint [int …]NoneStructure IDs to be selected manually.
emax_bofloatNoneUpper limit of energy in BO.
emin_bofloatNoneLower limit of energy in BO.

if decrpt is FP

CrySPY 1.3.0 or later

fppath and fp_rmin are obsolete.

NameValueDefaultDescription
fp_rmaxfloat8.0Only used with dscrpt = FP. Maximum cutoff of r in fingerprint.
fp_npointsint20Only used with dscrpt = FP. Number of discretized points for each pair in fingerprint.
fp_sigmafloat0.7Only used with dscrpt = FP. Sigma parameter [Å] in Gaussian smearing function.

CrySPY 1.2.5 or earlyer

NameValueDefaultDescription
fppathstrNoneOnly used with dscrpt = FP. Path of cal_fingerprint. If None, fwpath is automatically searched in your $PATH.
fp_rminfloat0.5Only used with dscrpt = FP. Minimum cutoff of r in fingerprint.
fp_rmaxfloat5.0Only used with dscrpt = FP. Maximum cutoff of r in fingerprint.
fp_npointsint20Only used with dscrpt = FP. Number of discretized points for each pair in fingerprint.
fp_sigmafloat1.0Only used with dscrpt = FP. Sigma parameter [Å] in Gaussian smearing function.

[LAQA] section

LAQA (algo = LAQA)を使う場合,[LAQA]セクションが必要.

NameValueDefaultDescription
nselect_laqaint1度の選択で選ばれる構造の数.
wffloat0.1力の項の重み.
wsfloat10.0ストレス項の重み.
情報

algo = LAQAでは[option]セクションの下記の二つは自動的にTrueになる.

  • force_step_flag = True
  • stress_step_flag = True

原子に働く力とストレスのデータは1ステップごとに収集される. エネルギーと構造データは1ステップごとではなく,選択ごとに収集される. つまり,この場合は10ステップおきにエネルギーと構造データは保存される. もし1ステップごとのデータが欲しいのであれば,手動で下記の設定を追加すること.

[option]
energy_step_flag = True
struc_step_flag = True

[option] section

NameValueDefaultDescription
stop_chkptint0CrySPY stops at a specified check point.
load_struc_flagboolFalseIf True, load initial structures from ./data/pkl_data/init_struc_data.pkl.
stop_next_strucboolFalseIf True, CrySPY does not submit jobs for next structures, but jobs for next stage are submitted.
recalcint [int …](empty list)Specify structure IDs if you want to recalculate or continue optimization.
append_struc_eaboolFalseIf True, append structures by EA.
energy_step_flagboolFalseIf True, save energy_step_data in ./data/pkl_data/energy_step_data.pkl.
struc_step_flagboolFalseIf True, save struc_step_data in ./data/pkl_data/struc_step_data.pkl.
force_step_flagboolFalseIf True, save force_step_data in ./data/pkl_data/force_step_data.pkl.
stress_step_flagboolFalseIf True, save stress_step_data in ./data/pkl_data/stress_step_data.pkl.

Kpoint

2024年4月22日

CrySPYではk-pointのセッティングはpymatgenpymatgen.io.vasp.Kpoints.automatic_density_by_vol関数を使って自動生成している. 以下はcryspy.innstage = 2の場合の例:

[VASP]
kppvol = 40 120
  • stage 1: kppvol = 40
  • stage 2: kppvol = 120

kppvolは逆格子空間でのÅ ${}^{-3} $あたりのグリッド密度.
VASP:hexagonalとface-centeredセルではガンマ点を通るメッシュが使われ,それ以外ではMonkhorst-Packが使われる.
QE and OMX:kメッシュだけ利用,オフセットは設定しない.

kppvolの値はどれくらいが適切か?

下記を参考に.結晶構造の画像はVESTAを使用.

Primitive cell of diamond Si

fig_prim_diamond fig_prim_diamond

a = b = c = 3.836 Å

kppvolk-mesh
0[1, 1, 1]
20[4, 4, 4]
40[6, 6, 6]
60[7, 7, 7]
80[7, 7, 7]
100[8, 8, 8]
120[9, 9, 9]
140[9, 9, 9]
160[9, 9, 9]
180[10, 10, 10]
200[10, 10, 10]
400[13, 13, 13]
600[15, 15, 15]
800[17, 17, 17]

Conventional cell of diamond Si

fig_conv_diamond fig_conv_diamond

a = b = c = 5.431 Å

kppvolk-mesh
0[1, 1, 1]
20[3, 3, 3]
40[3, 3, 3]
60[4, 4, 4]
80[4, 4 ,4]
100[5, 5, 5]
120[5, 5, 5]
140[6, 6, 6]
160[6, 6, 6]
180[6, 6, 6]
200[6, 6, 6]
400[8, 8, 8]
600[9, 9, 9]
800[10, 10, 10]

Nd2Fe14B

fig_Nd2Fe12B fig_Nd2Fe12B

a = b = 8.804 Å
c = 12.205 Å

kppvolk-mesh
0[1, 1, 1]
20[1, 1, 1]
40[2, 2, 1]
60[2, 2, 2]
80[3, 3 ,2]
100[3, 3, 2]
120[3, 3, 2]
140[3, 3, 2]
160[3, 3, 2]
180[4, 4, 2]
200[4, 4, 3]
400[5, 5, 3]
600[6, 6, 4]
800[6, 6, 4]