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

Name Value Default Description
algo RS, EA, BO, LAQA Algorithm
calc_code VASP, QE, OMX, soiap, LAMMPS Caluculation code for structure optimization
tot_struc int The total number of structures
nstage int The number of stages
njob int The number of jobs running at the same time.
jobcmd str Command to submit jobs such as qsub and sbatch.
jobfile str File name of the job file.

[structure] section

Name Value Default Description
struc_mode crystal, mol, mol_bs crystal Structure generation mode
natot int The total number of atoms.
atype atomic symbol [atomic symbol …] Atom type. e.g. atype = Na Cl.
nat int [int …] The number of atoms in each atom type. e.g. nat = 8 8.
mol_file str [str …], None None Path of molecule files or molecule names.
nmol int [int …], None None The number of molecules.
timeout_mol float 120.0 Time out for molecular structure generation.
rot_mol random, random_mol, random_wyckoff random_wyckoff Mode for rotation of molecules.
nrot int 20 Maximum number of trials to rotate molecules in mol_bs
vol_factor float float 1.0 1.0 Minimum and maximum values of volume factor.
vol_mu float, None None Mean of volume if you want specify the volume of cells.
vol_sigma float, None None Standard deviation of volume if you want specify the volume of cells.
mindist (mindist_?) float [float …], None None Constraint on minimum interatomic distance [Å].
mindist_factor float 1.0 Scaling factor for mindist.
mindist_mol_bs (mindist_mol_bs_?) float [float …], None None Constraint on minimum intermolecular distance [Å].
mindist_mol_bs_factor float 1.0 Scaling factor for mindist_mol_bs.
symprec float, 0.01 Precision for symmetry finding.
spgnum all, space group number, 0 all Constraint on space group. If all, 1–230. If 0, random structure without space group information (no symmetry).
use_find_wy bool False Structure generation with find_wy.
fwpath str, None None Path of find_wy
minlen float, None None Only used with find_wy or spgnum = 0. Minimum length of lattice vector [Å].
maxlen float, None None Only used with find_wy or spgnum = 0. Maximum length of lattice vector [Å].
dangle float, None None Only used with find_wy or spgnum = 0. Delta angle for alpha, beta, and gamma in degree unit.
maxcnt int 50 Only used with find_wy or spgnum = 0. Maximum number of trials to determine atom positions.

[VASP] section

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

Name Value Default Description
kppvol int [int …] Grid density per Å**(-3) of reciprocal cell in each stage
force_gamma bool False If true, force gamma-centered mesh.

[QE] section

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

Name Value Default Description
kppvol int [int …] Grid density per Å**(-3) of reciprocal cell in each stage
qe_infile str File name of QE input file.
qe_outfile str File name of QE output file.
pv_term bool False If true, read enthalpy instead of total energy.

pv_term

[OMX] section

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

Name Value Default Description
kppvol int [int …] Grid density per Å**(-3) of reciprocal cell in each stage
OMX_infile str File name of OpenMX input file.
OMX_outfile str File name of OpenMX output file.
ValenceElectrons str float float [str float float …] The number of initial charges for up and down spin states.

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)

Name Value Default Description
soiap_infile str File name of soiap input file.
soiap_outfile str File name of soiap output file.
soiap_cif str File name of soiap CIF-formatted initial structure.

[LAMMPS] section

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

Name Value Default Description
lammps_infile str File name of LAMMPS input file.
lammps_outfile str File name of LAMMPS output file.
lammps_potential str [str …], None None Potential.
lammps_data str File name of LAMMPS data file.

[ASE] section

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

Name Value Default Description
ase_python str File name of ASE input file.

[EA] section

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

Name Value Default Description
n_pop int Population from second generation.
n_crsov int The number of structures generated by crossover.
n_perm int The number of structures generated by permutation.
n_strain int The number of structures generated by strain.
n_rand int The number of structures generated randomly.
n_elite int The number of elite structures.
fit_reverse bool False If False, minimal search.
n_fittest int None The number of structures which can survive.
slct_func TNM, RLT Select function.
t_size int 3 Only used with slct_func = TNM. Tournament size.
a_rlt float 10.0 Only used with slct_func = RLT. Parameter for linear scaling.
b_rlt float 1.0 Only used with slct_func = RLT. Parameter for linear scaling.
crs_lat equal, random equal How to mix lattice vectors.
nat_diff_tole int 4 Tolerance for difference in the number of atoms in crossover.
ntimes int 1 The number of times in permutation.
sigma_st float 0.5 Standard deviation for strain.
maxcnt_ea int 50 Maximum number of trials in EA.
maxgen_ea int 0 Maximum generation.
emax_ea float None Upper limit of energy in selecting parents.
emin_ea float None Lower limit of energy in selecting parents.

[BO] section

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

Name Value Default Description
nselect_bo int The number of structures to be selected at once.
score TS, EI, PI Acquisition function.
num_rand_basis int If 0, Gaussian process. The number of basis function.
cdev float 0.001 Cutoff of deviation for standardization.
dscrpt FP Descriptor for structures.
fppath str, None None Only used with dscrpt = FP. Path of cal_fingerprint.
fp_rmin float 0.5 Only used with dscrpt = FP. Minimum cutoff of r in fingerprint.
fp_rmax float 5.0 Only used with dscrpt = FP. Maximum cutoff of r in fingerprint.
fp_npoints int 20 Only used with dscrpt = FP. Number of discretized points for each pair in fingerprint.
fp_sigma float 1.0 Only used with dscrpt = FP. Sigma parameter [Å] in Gaussian smearing function.
max_select_bo int 0 Maximum number of selection.
manual_select_bo int [int …] [] Structure IDs to be selected manually.
emax_bo float None Upper limit of energy in BO.
emin_bo float None Lower limit of energy in BO.

[LAQA] section

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

Name Value Default Description
nselect_laqa int The number of structures to be selected at once.
wf float 0.1 Weight of the force term.
ws float 10.0 Weight 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

Name Value Default Description
stop_chkpt int 0 CrySPY stops at a specified check point.
load_struc_flag bool False If True, load initial structures from ./data/pkl_data/init_struc_data.pkl.
stop_next_struc bool False If True, CrySPY does not submit jobs for next structures, but jobs for next stage are submitted.
recalc int [int …] (empty list) Specify structure IDs if you want to recalculate or continue optimization.
append_struc_ea bool False If True, append structures by EA.
energy_step_flag bool False If True, save energy_step_data in ./data/pkl_data/energy_step_data.pkl.
struc_step_flag bool False If True, save struc_step_data in ./data/pkl_data/struc_step_data.pkl.
force_step_flag bool False If True, save force_step_data in ./data/pkl_data/force_step_data.pkl.
stress_step_flag bool False If True, save stress_step_data in ./data/pkl_data/stress_step_data.pkl.