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

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

2025年3月6日 更新

NameValueDefaultDescription
algoRS, EA, EA-vc, BO, LAQAアルゴリズム
calc_codeVASP, QE, OMX, soiap, LAMMPS, ASE構造最適化の計算コード
tot_strucint構造数.EAやEA-vcの場合は使用されない.
nstageintステージ数
njobint同時に投入するジョブの数
jobcmdstrジョブを投入するコマンド,例えばqsubやsbatch
jobfilestrジョブファイルのファイル名

[structure] section

2025年7月4日 更新

NameValueDefaultDescription
struc_modecrystal, mol, mol_bscrystal構造生成モード
atypeatomic symbol [atomic symbol …]Atom type. e.g. atype = Na Cl. EA-vcでは使用されない.
natint [int …]atom typeに応じた原子数. e.g. nat = 8 8.
mindist (mindist_?)float [float …]None最小原子間距離の制限 [Å].
mindist_factorfloat1.0mindistのスケーリング係数
vol_factorfloat1.0体積スケーリング係数
vol_mufloatNone体積の平均.体積を指定したい場合に使用
vol_sigmafloatNone体積の標準偏差.体積を指定したい場合に使用
symprecfloat0.01対称性を見つける際の精度
spgnumall, space group number, 0all空間群の制限.allであれば1–230の全て.0であれば空間群情報のない(対称性のない)ランダム構造生成
use_find_wyboolFalsefind_wyを使用して構造生成する際のオプション

mindist


if algo is EA-vc

NameValueDefaultDescription
ll_natint [int …]natの下限. e.g. ll_nat = 0 0.
ul_natint [int …]natの上限. e.g. ul_nat = 8 8.
chargeint [int …]None電荷中性条件を課したい時に使用.各atom typeの電荷. e.g. charge = 1 -1 for NaCl.

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

2025年7月12日 更新

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

NameValueDefaultDescription
kppvolint [int …]各ステージにおける逆格子空間でのÅ**(-3)あたりのグリッド密度.
force_gammaboolFalseTrueなら常にガンマ点を通るメッシュを使う.
vasp_MAGMOMfloat [float …]NoneEA-vcの時のみ使用.各元素に対応するMAGMOMの値.
vasp_LDAULint [int …]NoneEA-vcの時のみ使用.各元素に対応するLDAULの値.
vasp_LDAUUfloat [float …]NoneEA-vcの時のみ使用.各元素に対応するLDAUUの値.
vasp_LDAUJfloat [float …]NoneEA-vcの時のみ使用.各元素に対応するLDAUJの値.

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

2025年7月7日 更新

NameValueDefaultDescription
n_popintPopulation (see also Population size)
n_crsovintNumber of offspring created by crossover
n_permintNumber of offspring created by permutation
n_strainintNumber of offspring created by strain
n_randintNumber of structures created randomly
n_eliteintNumber of elite individuals (see also Natural selection)
fit_reverseboolFalseIf False, minimal search (see also Evaluate fitness)
n_fittestint0Number of individuals that remain natural selection. If set to 0, all individuals are retained.
slct_funcTNM, RLTFunction to select parents
t_sizeint3Tournament size. Used only used slct_func = TNM. (see also Tournament selection)
a_rltfloat10.0Parameter for linear scaling. Used only with slct_func = RLT. (see also Roulette selection)
b_rltfloat1.0Parameter for linear scaling. Used only with slct_func = RLT. (see also Roulette selection)
crs_latequal, randomrandomHow to mix lattice vectors (see also crossover > 5. Swap the sliced halves)
nat_diff_toleint4Tolerance for difference in the number of atoms in crossover. (see also crossover > 6. Select the offspring with more atoms)
ntimesint1Number of times in permutation.
sigma_stfloat0.5Standard deviation for strain.
maxcnt_eaint50Maximum number of trials in EA.
maxgen_eaint0Maximum generation. If set to 0, no upper limit is applied.
emax_eafloatNoneEnergy upper limit (eV/atom) for natural selection.
emin_eafloatNoneEnergy lower limit (eV/atom) for natural selection.

NameValueDefaultDescription
n_addintNumber of offspring created by addition.
add_maxint3(since version 1.4.1) Maximum number of atoms to add in addition
n_elimintNumber of offspring created by elimination.
elim_maxint3(since version 1.4.1) Maximum number of atoms to eliminate in elimination
n_subsintNumber of offspring created by substitution.
targetstrrandomTarget. Only random for now.
end_point(float, …, float)Energy of end points for formation energy.
emax_eafloatNoneEnergy upper limit (eV/atom) for computing the convex hull.
emin_eafloatNoneEnergy lower limit (eV/atom) for computing the convex hull.
cgenintNone(since version 1.4.1) Which generation’s data to plot up to. If None, data will be plotted up to the latest generation.
show_maxfloat0.2When plotting the convex hull, the maximum value of the y-axis (for binary systems) or the maximum hull distance (for ternary systems) is set by show_max.
lable_stableboolTrueWhether to show stable compositions when plotting the convex hull.
vmaxfloat0.2Maximum value of the colorbar representing hull distance.
bottom_marginfloat0.02Bottom margin of the y-axis for binary convex hull plot.
fig_formatstrsvgFigure format for convex hull plot: svg, png, or pdf.

[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
check_mindist_optboolTrueIf True, a mindist constraint is checked after structure relaxation.
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]