Subsections of Input file

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.

Info

See configparser in detail.

Note

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

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.
mol_filestr [str …], NoneNonePath of molecule files or molecule names.
nmolint [int …], NoneNoneThe number of molecules.
timeout_molfloat120.0Time out for molecular structure generation.
rot_molrandom, random_mol, random_wyckoffrandom_wyckoffMode for rotation of molecules.
nrotint20Maximum number of trials to rotate molecules in mol_bs
vol_factorfloat float1.0 1.0Minimum and maximum values of volume factor.
vol_mufloat, NoneNoneMean of volume if you want specify the volume of cells.
vol_sigmafloat, NoneNoneStandard deviation of volume if you want specify the volume of cells.
mindist (mindist_?)float [float …], NoneNoneConstraint on minimum interatomic distance [Å].
mindist_factorfloat1.0Scaling factor for mindist.
mindist_mol_bs (mindist_mol_bs_?)float [float …], NoneNoneConstraint on minimum intermolecular distance [Å].
mindist_mol_bs_factorfloat1.0Scaling factor for mindist_mol_bs.
symprecfloat,0.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.
fwpathstr, NoneNonePath of find_wy
minlenfloat, NoneNoneOnly used with find_wy or spgnum = 0. Minimum length of lattice vector [Å].
maxlenfloat, NoneNoneOnly used with find_wy or spgnum = 0. Maximum length of lattice vector [Å].
danglefloat, NoneNoneOnly 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.

mindist

[VASP] section

2024 April 22

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

NameValueDefaultDescription
kppvolint [int …]Grid density per Å**(-3) of reciprocal cell in each stage.
force_gammaboolFalseIf true, force gamma-centered mesh.

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 May 7, updated

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

NameValueDefaultDescription
n_popintPopulation from second generation.
n_crsovintThe number of structures generated by crossover.
n_permintThe number of structures generated by permutation.
n_strainintThe number of structures generated by strain.
n_randintThe number of structures generated randomly.
n_eliteintThe number of elite structures.
fit_reverseboolFalseIf False, minimal search.
n_fittestintNoneThe number 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.
ntimesint1The number 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.

[BO] section

[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_basisintIf 0, Gaussian process. The number of basis function.
cdevfloat0.001Cutoff of deviation for standardization.
dscrptFPDescriptor for structures.
fppathstr, NoneNoneOnly used with dscrpt = FP. Path of cal_fingerprint.
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.
max_select_boint0Maximum number of selection.
manual_select_boint [int …][]Structure IDs to be selected manually.
emax_bofloatNoneUpper limit of energy in BO.
emin_bofloatNoneLower limit of energy in BO.

[LAQA] section

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

NameValueDefaultDescription
nselect_laqaintThe number of structures to be selected at once.
wffloat0.1Weight of the force term.
wsfloat10.0Weight of the stress term.
Info

If algo = LAQA, the followings are automatically set in the [option] section.

  • force_step_flag = True
  • stress_step_flag = True

Force and stress data are collected step by step. Energy and structure data are NOT. They are collected for each selection. In other words, in this case, energy and structure data are saved once every 10 steps. If you want to collect energy and structure data step by step, manually set up as follows:

[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 April 22

CrySPY automatically generates the k-point setting using the pymatgen.io.vasp.Kpoints.automatic_density_by_vol function from pymatgen. An example in cryspy.in with nstage = 2 is as follows:

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

kppvol means a grid density per Å ${}^{-3} $ of reciprocal cell.
VASP: gamma centered meshes are used for hexagonal cells and face-centered cells; otherwise, Monkhorst-Pack grids are employed.
QE and OMX: only a k-mesh is provided, no offset.

What is the appropriate value for kppvol?

Here are the guidelines. We use VESTA for visualizing crystal structures.

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]