dpgen.auto_test.lib package
Submodules
dpgen.auto_test.lib.BatchJob module
- class dpgen.auto_test.lib.BatchJob.BatchJob(job_dir='', job_script='', job_finish_tag='tag_finished', job_id_file='tag_jobid')[source]
Bases:
object
Abstract class of a batch job It submit a job (leave the id in file tag_jobid) It check the status of the job (return JobStatus) NOTICE: I assume that when a job finishes, a tag file named tag_finished should be touched by the user. TYPICAL USAGE: job = DERIVED_BatchJob (dir, script) job.submit () stat = job.check_status ()
Methods
submission is $ [command] [script]
check_status
get_job_id
submit
dpgen.auto_test.lib.RemoteJob module
- class dpgen.auto_test.lib.RemoteJob.CloudMachineJob(ssh_session, local_root)[source]
Bases:
RemoteJob
Methods
block_call
block_checkcall
check_status
clean
download
get_job_root
submit
upload
- class dpgen.auto_test.lib.RemoteJob.JobStatus(value)[source]
Bases:
Enum
An enumeration.
- finished = 5
- running = 3
- terminated = 4
- unknow = 100
- unsubmitted = 1
- waiting = 2
- class dpgen.auto_test.lib.RemoteJob.PBSJob(ssh_session, local_root)[source]
Bases:
RemoteJob
Methods
block_call
block_checkcall
check_status
clean
download
get_job_root
submit
upload
- class dpgen.auto_test.lib.RemoteJob.RemoteJob(ssh_session, local_root)[source]
Bases:
object
Methods
block_call
block_checkcall
clean
download
get_job_root
upload
dpgen.auto_test.lib.SlurmJob module
dpgen.auto_test.lib.abacus module
- dpgen.auto_test.lib.abacus.poscar2stru(poscar, inter_param, stru)[source]
poscar: POSCAR for input
- inter_param: dictionary of ‘interaction’ from param.json
- some key words for ABACUS are:
atom_masses: a dictionary of atoms’ masses
orb_files: a dictionary of orbital files
deepks_desc: a string of deepks descriptor file
stru: output filename, usally is ‘STRU’
dpgen.auto_test.lib.crys module
dpgen.auto_test.lib.lammps module
- dpgen.auto_test.lib.lammps.apply_type_map(conf_file, deepmd_type_map, ptypes)[source]
apply type map. conf_file: conf file converted from POSCAR deepmd_type_map: deepmd atom type map ptypes: atom types defined in POSCAR
- dpgen.auto_test.lib.lammps.cvt_lammps_conf(fin, fout, type_map, ofmt='lammps/data')[source]
Format convert from fin to fout, specify the output format by ofmt Imcomplete situation
- dpgen.auto_test.lib.lammps.get_nev(log)[source]
get natoms, energy_per_atom and volume_per_atom from lammps log
- dpgen.auto_test.lib.lammps.make_lammps_elastic(conf, type_map, interaction, param, etol=0, ftol=1e-10, maxiter=5000, maxeval=500000)[source]
- dpgen.auto_test.lib.lammps.make_lammps_equi(conf, type_map, interaction, param, etol=0, ftol=1e-10, maxiter=5000, maxeval=500000, change_box=True)[source]
- dpgen.auto_test.lib.lammps.make_lammps_phonon(conf, masses, interaction, param, etol=0, ftol=1e-10, maxiter=5000, maxeval=500000)[source]
make lammps input for elastic calculation
dpgen.auto_test.lib.lmp module
dpgen.auto_test.lib.mfp_eosfit module
- dpgen.auto_test.lib.mfp_eosfit.BM4(vol, pars)[source]
Birch-Murnaghan 4 pars equation from PRB 70, 224107, 3-order
- dpgen.auto_test.lib.mfp_eosfit.BM5(vol, pars)[source]
Birch-Murnaghan 5 pars equation from PRB 70, 224107, 4-Order
- dpgen.auto_test.lib.mfp_eosfit.LOG4(vol, pars)[source]
Natrual strain (Poirier-Tarantola)EOS with 4 paramters Seems only work in near-equillibrium range.
- dpgen.auto_test.lib.mfp_eosfit.LOG5(vol, parameters)[source]
Natrual strain (Poirier-Tarantola)EOS with 5 paramters
- dpgen.auto_test.lib.mfp_eosfit.SJX_5p(vol, par)[source]
SJX_5p’s five parameters EOS, Physica B: Condens Mater, 2011, 406: 1276-1282
- dpgen.auto_test.lib.mfp_eosfit.SJX_v2(vol, par)[source]
Sun Jiuxun, et al. J phys Chem Solids, 2005, 66: 773-782. They said it is satified for the limiting condition at high pressure.
- dpgen.auto_test.lib.mfp_eosfit.TEOS(v, par)[source]
Holland, et al, Journal of Metamorphic Geology, 2011, 29(3): 333-383 Modified Tait equation of Huang & Chow
- dpgen.auto_test.lib.mfp_eosfit.birch(v, parameters)[source]
From Intermetallic compounds: Principles and Practice, Vol. I: Princples Chapter 9 pages 195-210 by M. Mehl. B. Klein, D. Papaconstantopoulos paper downloaded from Web
case where n=0
- dpgen.auto_test.lib.mfp_eosfit.ext_vec(func, fin, p0, fs, fe, vols=None, vole=None, ndata=101, refit=0, show_fig=False)[source]
extrapolate the data points for E-V based on the fitted parameters in small or very large volume range.
- dpgen.auto_test.lib.mfp_eosfit.ext_velp(fin, fstart, fend, vols, vole, ndata, order=3, method='unispl', fout='ext_velp.dat', show_fig=False)[source]
extrapolate the lattice parameters based on input data
- dpgen.auto_test.lib.mfp_eosfit.lsqfit_eos(func, fin, par, fstart, fend, show_fig=False, fout='EoSfit.out', refit=-1)[source]
- dpgen.auto_test.lib.mfp_eosfit.mBM4(vol, pars)[source]
Birch-Murnaghan 4 pars equation from PRB 70, 224107, 3-order BM
- dpgen.auto_test.lib.mfp_eosfit.mBM4poly(vol, parameters)[source]
modified BM5 EOS, Shang SL comput mater sci, 2010: 1040-1048, original expressions.
- dpgen.auto_test.lib.mfp_eosfit.mBM5(vol, pars)[source]
modified BM5 EOS, Shang SL comput mater sci, 2010: 1040-1048
- dpgen.auto_test.lib.mfp_eosfit.mBM5poly(vol, pars)[source]
modified BM5 EOS, Shang SL comput mater sci, 2010: 1040-1048, original expressions.
- dpgen.auto_test.lib.mfp_eosfit.morse_3p(volume, p)[source]
morse_AB EOS formula from Song’s FVT souces A= 0.5*B
- dpgen.auto_test.lib.mfp_eosfit.morse_6p(vol, par)[source]
Generalized Morse EOS proposed by Qin, see: Qin et al. Phys Rev B, 2008, 78, 214108. Qin et al. Phys Rev B, 2008, 77, 220103(R).
- dpgen.auto_test.lib.mfp_eosfit.morse_AB(volume, p)[source]
morse_AB EOS formula from Song’s FVT souces
- dpgen.auto_test.lib.mfp_eosfit.murnaghan(vol, pars)[source]
Four-parameters murnaghan EOS. From PRB 28,5480 (1983)
- dpgen.auto_test.lib.mfp_eosfit.rBM4(vol, pars)[source]
Implementions as Alberto Otero-de-la-Roza, i.e. rBM4 is used here Comput Physics Comm, 2011, 182: 1708-1720
- dpgen.auto_test.lib.mfp_eosfit.rBM4_pv(vol, pars)[source]
Implementions as Alberto Otero-de-la-Roza, i.e. rBM4 is used here Comput Physics Comm, 2011, 182: 1708-1720 Fit for V-P relations
- dpgen.auto_test.lib.mfp_eosfit.rBM5(vol, pars)[source]
Implementions as Alberto Otero-de-la-Roza, i.e. rBM5 is used here Comput Physics Comm, 2011, 182: 1708-1720
- dpgen.auto_test.lib.mfp_eosfit.rBM5_pv(vol, pars)[source]
Implementions as Alberto Otero-de-la-Roza, i.e. rBM5 is used here Comput Physics Comm, 2011, 182: 1708-1720 Fit for V-P relations
- dpgen.auto_test.lib.mfp_eosfit.rPT4(vol, pars)[source]
Natrual strain EOS with 4 paramters Seems only work in near-equillibrium range. Implementions as Alberto Otero-de-la-Roza, i.e. rPT4 is used here Comput Physics Comm, 2011, 182: 1708-1720, in their article, labeled as PT3 (3-order), however, we mention it as rPT4 for 4-parameters EOS.
- dpgen.auto_test.lib.mfp_eosfit.rPT4_pv(vol, pars)[source]
Natrual strain (Poirier-Tarantola)EOS with 4 paramters Seems only work in near-equillibrium range. Implementions as Alberto Otero-de-la-Roza, i.e. rPT4 is used here Comput Physics Comm, 2011, 182: 1708-1720, in their article, labeled as PT3 (3-order), however, we mention it as rPT4 for 4-parameters EOS.
- dpgen.auto_test.lib.mfp_eosfit.rPT5(vol, pars)[source]
Natrual strain EOS with 4 paramters Seems only work in near-equillibrium range. Implementions as Alberto Otero-de-la-Roza, i.e. rPT5 is used here Comput Physics Comm, 2011, 182: 1708-1720, in their article, labeled as PT3 (3-order), however, we mention it as rPT5 for 4-parameters EOS.
- dpgen.auto_test.lib.mfp_eosfit.rPT5_pv(vol, pars)[source]
Natrual strain (Poirier-Tarantola)EOS with 5 paramters Implementions as Alberto Otero-de-la-Roza, i.e. rPT5 is used here Comput Physics Comm, 2011, 182: 1708-1720, in their article, labeled as PT3 (3-order), however, we mention it as rPT5 for 4-parameters EOS.
- dpgen.auto_test.lib.mfp_eosfit.universal(vol, parameters)[source]
Universal equation of state(Vinet P et al., J. Phys.: Condens. Matter 1, p1941 (1989))
dpgen.auto_test.lib.pwscf module
dpgen.auto_test.lib.siesta module
dpgen.auto_test.lib.util module
dpgen.auto_test.lib.utils module
dpgen.auto_test.lib.vasp module
- dpgen.auto_test.lib.vasp.make_vasp_phonon_incar(ecut, ediff, npar, kpar, kspacing=0.5, kgamma=True, ismear=1, sigma=0.2)[source]
- dpgen.auto_test.lib.vasp.make_vasp_relax_incar(ecut, ediff, relax_ion, relax_shape, relax_volume, npar, kpar, kspacing=0.5, kgamma=True, ismear=1, sigma=0.22)[source]