Subsections of Examples
ase_chgnet_Sr4Co4O12
Download
ase_chgnet_RS_Sr4Co4O12.tar.gzcryspy.in
[basic]
algo = RS
calc_code = ASE
tot_struc = 10
nstage = 1
njob = 2
jobcmd = bash
jobfile = job_cryspy
[structure]
natot = 20
atype = Sr Co O
nat = 4 4 12
mindist_1 = 2.2 2.0 1.8
mindist_2 = 2.0 2.2 1.5
mindist_3 = 1.8 1.5 2.0
[ASE]
ase_python = chgnet_in.py
[option]
calc_in/
chgnet_in.py_1
from chgnet.model import StructOptimizer
from pymatgen.core import Structure
# ---------- input structure
# CrySPY outputs 'POSCAR' as an input file in work/xxxxxx directory
structure = Structure.from_file('POSCAR')
# ---------- relax
relaxer = StructOptimizer()
result = relaxer.relax(atoms=structure, fmax=0.01, steps=2000)
# ---------- opt. structure and energy
# [rule in ASE interface]
# output file for energy: 'log.tote' in eV/cell
# CrySPY reads the last line of 'log.tote'
# output file for structure: 'CONTCAR' in vasp format
# ------ energy
traj = result['trajectory']
e = traj.compute_energy() # eV/cell
with open('log.tote', mode='w') as f:
f.write(str(e))
# ------ struc
opt_struc = result["final_structure"]
opt_struc.to(fmt='poscar', filename='CONTCAR')
job_cryspy
#!/bin/sh
# ---------- ASE
python3 chgnet_in.py > out.log
# ---------- for error
if [ ! -f "log.tote" ]; then
sed -i -e '3 s/^.*$/skip/' stat_job
exit 1
fi
# ---------- CrySPY
sed -i -e '3 s/^.*$/done/' stat_job
ase_Cu8_RS
Download
ase_Cu8_RS.tar.gzcryspy.in
[basic]
algo = RS
calc_code = ASE
tot_struc = 5
nstage = 1
njob = 2
jobcmd = zsh
jobfile = job_cryspy
[structure]
natot = 8
atype = Cu
nat = 8
[ASE]
ase_python = ase_in.py
[option]
calc_in/
ase_in.py_1
from ase.constraints import ExpCellFilter, StrainFilter
from ase.calculators.emt import EMT
from ase.calculators.lj import LennardJones
from ase.optimize.sciopt import SciPyFminCG
from ase.optimize import BFGS
from ase.spacegroup.symmetrize import FixSymmetry
import numpy as np
from ase.io import read, write
# ---------- input structure
# CrySPY outputs 'POSCAR' as an input file in work/xxxxxx directory
atoms = read('POSCAR', format='vasp')
# ---------- setting and run
atoms.calc = EMT()
atoms.set_constraint([FixSymmetry(atoms)])
atoms = ExpCellFilter(atoms, hydrostatic_strain=False)
opt = BFGS(atoms)
#opt=SciPyFminCG(atoms)
opt.run()
# ---------- opt. structure and energy
# [rule in ASE interface]
# output file for energy: 'log.tote' in eV/cell
# CrySPY reads the last line of 'log.tote'
# output file for structure: 'CONTCAR' in vasp format
e = atoms.atoms.get_total_energy()
with open('log.tote', mode='w') as f:
f.write(str(e))
write('CONTCAR', atoms.atoms, format='vasp')
job_cryspy
#!/bin/sh
# ---------- ASE
python3 ase_in.py
# ---------- CrySPY
sed -i -e '3 s/^.*$/done/' stat_job
soiap_Si8_RS
Download
soiap_Si8_RS.tar.gzcryspy.in
[basic]
algo = RS
calc_code = soiap
tot_struc = 5
nstage = 1
njob = 2
jobcmd = zsh
jobfile = job_cryspy
[structure]
natot = 8
atype = Si
nat = 8
[soiap]
soiap_infile = soiap.in
soiap_outfile = soiap.out
soiap_cif = initial.cif
[option]
calc_in/
soiap.in_1
crystal initial.cif ! CIF file for the initial structure
symmetry 1 ! 0: not symmetrize displacements of the atoms or 1: symmetrize
md_mode_cell 3 ! cell-relaxation method
! 0: FIRE, 2: quenched MD, or 3: RFC5
number_max_relax_cell 1000 ! max. number of the cell relaxation
number_max_relax 1 ! max. number of the atom relaxation
max_displacement 0.1 ! max. displacement of atoms in Bohr
external_stress_v 0.0 0.0 0.0 ! external pressure in GPa
th_force 5d-5 ! convergence threshold for the force in Hartree a.u.
th_stress 5d-7 ! convergence threshold for the stress in Hartree a.u.
force_field 1 ! force field
! 1: Stillinger-Weber for Si, 2: Tsuneyuki potential for SiO2,
! 3: ZRL for Si-O-N-H, 4: ADP for Nd-Fe-B, 5: Jmatgen, or
! 6: Lennard-Jones
job_cryspy
#!/bin/sh
# ---------- soiap
EXEPATH=/path/to/soiap
$EXEPATH/soiap soiap.in > soiap.out 2>&1
# ---------- CrySPY
sed -i -e '3 s/^.*$/done/' stat_job
soiap_Si8_RS_mindist
Info
For mindist
, see also Features > Restriction on interatomic distances.
Download
soiap_Si8_RS_mindist.tar.gzcryspy.in
[basic]
algo = RS
calc_code = soiap
tot_struc = 5
nstage = 1
njob = 2
jobcmd = zsh
jobfile = job_cryspy
[structure]
natot = 8
atype = Si
nat = 8
mindist_1 = 2.0
[soiap]
soiap_infile = soiap.in
soiap_outfile = soiap.out
soiap_cif = initial.cif
[option]
calc_in/
soiap.in_1
crystal initial.cif ! CIF file for the initial structure
symmetry 1 ! 0: not symmetrize displacements of the atoms or 1: symmetrize
md_mode_cell 3 ! cell-relaxation method
! 0: FIRE, 2: quenched MD, or 3: RFC5
number_max_relax_cell 1000 ! max. number of the cell relaxation
number_max_relax 1 ! max. number of the atom relaxation
max_displacement 0.1 ! max. displacement of atoms in Bohr
external_stress_v 0.0 0.0 0.0 ! external pressure in GPa
th_force 5d-5 ! convergence threshold for the force in Hartree a.u.
th_stress 5d-7 ! convergence threshold for the stress in Hartree a.u.
force_field 1 ! force field
! 1: Stillinger-Weber for Si, 2: Tsuneyuki potential for SiO2,
! 3: ZRL for Si-O-N-H, 4: ADP for Nd-Fe-B, 5: Jmatgen, or
! 6: Lennard-Jones
job_cryspy
#!/bin/sh
# ---------- soiap
EXEPATH=/path/to/soiap
$EXEPATH/soiap soiap.in > soiap.out 2>&1
# ---------- CrySPY
sed -i -e '3 s/^.*$/done/' stat_job
vasp_Na8Cl8_RS
Download
vasp_Na8Cl8_RS.tar.gzcryspy.in
[basic]
algo = RS
calc_code = VASP
tot_struc = 5
nstage = 2
njob = 2
jobcmd = qsub
jobfile = job_cryspy
[structure]
natot = 16
atype = Na Cl
nat = 8 8
mindist_1 = 2.5 1.5
mindist_2 = 1.5 2.5
[VASP]
kppvol = 40 80
[option]
calc_in/
INCAR_1
SYSTEM = NaCl
!!!LREAL = Auto
Algo = Fast
NSW = 40
LWAVE = .FALSE.
!LCHARG = .FALSE.
ISPIN = 1
ISMEAR = 0
SIGMA = 0.1
IBRION = 2
ISIF = 2
EDIFF = 1e-5
EDIFFG = -0.01
INCAR_2
SYSTEM = NaCl
!!LREAL = Auto
Algo = Fast
NSW = 200
ENCUT = 341
!!LWAVE = .FALSE.
!!LCHARG = .FALSE.
ISPIN = 1
ISMEAR = 0
SIGMA = 0.1
IBRION = 2
ISIF = 3
EDIFF = 1e-5
EDIFFG = -0.01
job_cryspy
#!/bin/sh
#$ -cwd
#$ -V -S /bin/bash
####$ -V -S /bin/zsh
#$ -N Na8Cl8_CrySPY_ID
#$ -pe smp 20
####$ -q ibis1.q
####$ -q ibis2.q
####$ -q ibis3.q
####$ -q ibis4.q
# ---------- vasp
VASPROOT=/usr/local/vasp/vasp.6.4.2/bin
mpirun -np $NSLOTS $VASPROOT/vasp_std
# ---------- CrySPY
sed -i -e '3 s/^.*$/done/' stat_job
vasp_Sr4O4_RS_pv_term
Download
vasp_Sr4O4_RS_pv_term.tar.gzcryspy.in
[basic]
algo = RS
calc_code = VASP
tot_struc = 10
nstage = 2
njob = 4
jobcmd = qsub
jobfile = job_cryspy
[structure]
natot = 8
atype = Sr O
nat = 4 4
[VASP]
kppvol = 40 80
[option]
calc_in/
INCAR_1
SYSTEM = SrO
Algo = Fast
NSW = 60
LWAVE = .FALSE.
!LCHARG = .FALSE.
ISPIN = 1
ISMEAR = 0
SIGMA = 0.1
IBRION = 2
ISIF = 2
EDIFF = 1e-5
EDIFFG = -0.01
PSTRESS = 400
INCAR_2
SYSTEM = NaCl
LREAL = Auto
Algo = Fast
NSW = 200
ENCUT = 520
!!LWAVE = .FALSE.
!!LCHARG = .FALSE.
ISPIN = 1
ISMEAR = 0
SIGMA = 0.1
IBRION = 2
ISIF = 3
EDIFF = 1e-5
EDIFFG = -0.01
PSTRESS = 400
job_cryspy
#!/bin/sh
#$ -cwd
#$ -V -S /bin/bash
####$ -V -S /bin/zsh
#$ -N SrO_CrySPY_ID
#$ -pe smp 20
####$ -q ibis1.q
####$ -q ibis2.q
####$ -q ibis3.q
####$ -q ibis4.q
# ---------- vasp
VASPROOT=/usr/local/vasp/vasp.6.4.2/bin
mpirun -np $NSLOTS $VASPROOT/vasp_std
# ---------- CrySPY
sed -i -e '3 s/^.*$/done/' stat_job
qe_Si8_RS
Download
qe_Si8_RS.tar.gzcryspy.in
[basic]
algo = RS
calc_code = QE
tot_struc = 5
nstage = 2
njob = 2
jobcmd = qsub
jobfile = job_cryspy
[structure]
natot = 8
atype = Si
nat = 8
[QE]
qe_infile = pwscf.in
qe_outfile = pwscf.out
kppvol = 40 80
[option]
calc_in/
pwscf.in_1
&control
title = 'Si8'
calculation = 'relax'
nstep = 100
restart_mode = 'from_scratch',
pseudo_dir = '/usr/local/pslibrary.1.0.0/pbe/PSEUDOPOTENTIALS/'
outdir='./out.d/'
/
&system
ibrav = 0
nat = 8
ntyp = 1
ecutwfc = 44.0
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-n-kjpaw_psl.1.0.0.UPF
pwscf.in_2
&control
title = 'Si8'
calculation = 'vc-relax'
nstep = 200
restart_mode = 'from_scratch',
pseudo_dir = '/usr/local/pslibrary.1.0.0/pbe/PSEUDOPOTENTIALS/'
outdir='./out.d/'
/
&system
ibrav = 0
nat = 8
ntyp = 1
ecutwfc = 44.0
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-n-kjpaw_psl.1.0.0.UPF
job_cryspy
#!/bin/sh
#$ -cwd
#$ -V -S /bin/bash
####$ -V -S /bin/zsh
#$ -N Si8_CrySPY_ID
#$ -pe smp 20
####$ -q ibis1.q
####$ -q ibis2.q
mpirun -np $NSLOTS /path/to/pw.x < pwscf.in > pwscf.out
if [ -e "CRASH" ]; then
sed -i -e '3 s/^.*$/skip/' stat_job
exit 1
fi
sed -i -e '3 s/^.*$/done/' stat_job
qe_benzene_2_RS_mol
Download
qe_benzene_2_RS_mol.tar.gzcryspy.in
[basic]
algo = RS
calc_code = QE
tot_struc = 6
nstage = 2
njob = 2
jobcmd = qsub
jobfile = job_cryspy
[structure]
struc_mode = mol
natot = 24
atype = H C
nat = 12 12
mol_file = benzene
nmol = 2
[QE]
qe_infile = pwscf.in
qe_outfile = pwscf.out
kppvol = 40 60
[option]
calc_in/
pwscf.in_1
&control
title = '2 benzene'
calculation = 'relax'
nstep = 30
restart_mode = 'from_scratch',
pseudo_dir = '/usr/local/pslibrary.1.0.0/pbe/PSEUDOPOTENTIALS/'
outdir='./outdir/'
/
&system
ibrav = 0
nat = 24
ntyp = 2
ecutwfc = 35.00
ecutrho = 300.00
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
/
ATOMIC_SPECIES
H 1.008 H.pbe-kjpaw_psl.1.0.0.UPF
C 12.01 C.pbe-n-kjpaw_psl.1.0.0.UPF
pwscf.in_2
&control
title = '2 benzene'
calculation = 'vc-relax'
nstep = 200
restart_mode = 'from_scratch',
pseudo_dir = '/usr/local/pslibrary.1.0.0/pbe/PSEUDOPOTENTIALS/'
outdir='./outdir/'
/
&system
ibrav = 0
nat = 24
ntyp = 2
ecutwfc = 46.00
ecutrho = 326.00
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
/
ATOMIC_SPECIES
H 1.008 H.pbe-kjpaw_psl.1.0.0.UPF
C 12.01 C.pbe-n-kjpaw_psl.1.0.0.UPF
job_cryspy
#!/bin/sh
#$ -cwd
#$ -V -S /bin/bash
####$ -V -S /bin/zsh
#$ -N bz_CrySPY_ID
#$ -pe smp 20
# ---------- qe run
mpirun -np $NSLOTS /path/to/pw.x < pwscf.in > pwscf.out
# ---------- qe if crash
if [ -e "CRASH" ]; then
sed -i -e '3 s/^.*$/skip/' stat_job
exit 1
fi
# ---------- cryspy
sed -i -e '3 s/^.*$/done/' stat_job
qe_Sr4O4_RS_pv_term
Download
qe_Sr4O4_RS_pv_term.tar.gzcryspy.in
[basic]
algo = RS
calc_code = QE
tot_struc = 10
nstage = 2
njob = 4
jobcmd = qsub
jobfile = job_cryspy
[structure]
natot = 8
atype = Sr O
nat = 4 4
[QE]
qe_infile = pwscf.in
qe_outfile = pwscf.out
kppvol = 40 80
pv_term = True
[option]
calc_in/
pwscf.in_1
&control
title = 'SrO'
calculation = 'relax'
nstep = 100
restart_mode = 'from_scratch',
pseudo_dir = '/usr/local/gbrv/all_pbe_UPF_v1.5/'
outdir='./out.d/'
/
&system
ibrav = 0
nat = 8
ntyp = 2
ecutwfc = 40
ecutrho = 200
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
press = 400
/
ATOMIC_SPECIES
Sr -1.0 sr_pbe_v1.uspp.F.UPF
O -1.0 o_pbe_v1.2.uspp.F.UPF
pwscf.in_2
&control
title = 'SrO'
calculation = 'vc-relax'
nstep = 200
restart_mode = 'from_scratch',
pseudo_dir = '/usr/local/gbrv/all_pbe_UPF_v1.5/'
outdir='./out.d/'
/
&system
ibrav = 0
nat = 8
ntyp = 2
ecutwfc = 40
ecutrho = 200
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
press = 400
/
ATOMIC_SPECIES
Sr -1.0 sr_pbe_v1.uspp.F.UPF
O -1.0 o_pbe_v1.2.uspp.F.UPF
job_cryspy
#!/bin/sh
#$ -cwd
#$ -V -S /bin/bash
####$ -V -S /bin/zsh
#$ -N SrO_CrySPY_ID
#$ -pe smp 20
####$ -q ibis1.q
####$ -q ibis2.q
# ---------- qe run
mpirun -np $NSLOTS /path/to/pw.x < pwscf.in > pwscf.out
# ---------- qe if crash
if [ -e "CRASH" ]; then
sed -i -e '3 s/^.*$/skip/' stat_job
exit 1
fi
# ---------- cryspy
sed -i -e '3 s/^.*$/done/' stat_job
qe_Si16_LAQA
Download
qe_Si16_LAQA.tar.gzcryspy.in
[basic]
algo = LAQA
calc_code = QE
tot_struc = 50
nstage = 1
njob = 10
jobcmd = qsub
jobfile = job_cryspy
[structure]
natot = 16
atype = Si
nat = 16
mindist_1 = 1.5
[QE]
qe_infile = pwscf.in
qe_outfile = pwscf.out
kppvol = 80
[LAQA]
nselect_laqa = 4
[option]
calc_in/
pwscf.in_1
&control
calculation = 'vc-relax'
pseudo_dir = '/usr/local/gbrv/all_pbe_UPF_v1.5/'
outdir='./outdir/'
nstep = 10
/
&system
ibrav = 0
nat = 16
ntyp = 1
ecutwfc = 40
ecutrho = 200
occupations = 'smearing'
degauss = 0.01
/
&electrons
/
&ions
/
&cell
/
ATOMIC_SPECIES
Si -1.0 si_pbe_v1.uspp.F.UPF
job_cryspy
#!/bin/sh
#$ -cwd
#$ -V -S /bin/bash
####$ -V -S /bin/zsh
#$ -N Si_CrySPY_ID
#$ -pe smp 20
####$ -q ibis1.q
####$ -q ibis2.q
# ---------- qe run
mpirun -np $NSLOTS /path/to/pw.x < pwscf.in > pwscf.out
# ---------- qe if crash
if [ -e "CRASH" ]; then
sed -i -e '3 s/^.*$/skip/' stat_job
exit 1
fi
# ---------- cryspy
sed -i -e '3 s/^.*$/done/' stat_job