dpti.lib package

Contents

dpti.lib package#

Submodules#

dpti.lib.RemoteJob module#

class dpti.lib.RemoteJob.CloudMachineJob(ssh_session, local_root)[source]#

Bases: RemoteJob

Methods

block_call

block_checkcall

check_status

clean

download

get_job_root

submit

upload

check_status()[source]#
submit(job_dirs, cmd, args=None, resources=None)[source]#
class dpti.lib.RemoteJob.JobStatus(value)[source]#

Bases: Enum

An enumeration.

finished = 5#
running = 3#
terminated = 4#
unknow = 100#
unsubmitted = 1#
waiting = 2#
class dpti.lib.RemoteJob.PBSJob(ssh_session, local_root)[source]#

Bases: RemoteJob

Methods

block_call

block_checkcall

check_status

clean

download

get_job_root

submit

upload

check_status()[source]#
submit(job_dirs, cmd, args=None, resources=None)[source]#
class dpti.lib.RemoteJob.RemoteJob(ssh_session, local_root)[source]#

Bases: object

Methods

block_call

block_checkcall

clean

download

get_job_root

upload

block_call(cmd)[source]#
block_checkcall(cmd)[source]#
clean()[source]#
download(job_dirs, remote_down_files)[source]#
get_job_root()[source]#
upload(job_dirs, local_up_files, dereference=True)[source]#
class dpti.lib.RemoteJob.SSHSession(jdata)[source]#

Bases: object

Methods

close

get_session_root

get_ssh_client

close()[source]#
get_session_root()[source]#
get_ssh_client()[source]#
class dpti.lib.RemoteJob.SlurmJob(ssh_session, local_root)[source]#

Bases: RemoteJob

Methods

block_call

block_checkcall

check_status

clean

download

get_job_root

submit

upload

check_status()[source]#
submit(job_dirs, cmd, args=None, resources=None)[source]#

dpti.lib.dump module#

dpti.lib.dump.box2dumpbox(orig, box)[source]#
dpti.lib.dump.dumpbox2box(bounds, tilt)[source]#
dpti.lib.dump.get_atype(lines)[source]#
dpti.lib.dump.get_dumpbox(lines)[source]#
dpti.lib.dump.get_natoms(lines)[source]#
dpti.lib.dump.get_natoms_vec(lines)[source]#
dpti.lib.dump.get_natomtypes(lines)[source]#
dpti.lib.dump.get_posi(lines)[source]#
dpti.lib.dump.split_traj(dump_lines)[source]#
dpti.lib.dump.system_data(lines)[source]#

dpti.lib.lammps module#

dpti.lib.lammps.get_last_dump(dump)[source]#
dpti.lib.lammps.get_natoms(filename)[source]#
dpti.lib.lammps.get_thermo(filename)[source]#
dpti.lib.lammps.get_thermo_old(filename)[source]#

dpti.lib.lmp module#

dpti.lib.lmp.box2lmpbox(orig, box)[source]#
dpti.lib.lmp.from_system_data(system)[source]#
dpti.lib.lmp.get_atoms(lines)[source]#
dpti.lib.lmp.get_atype(lines)[source]#
dpti.lib.lmp.get_id(lines)[source]#
dpti.lib.lmp.get_lmpbox(lines)[source]#
dpti.lib.lmp.get_natoms(lines)[source]#
dpti.lib.lmp.get_natoms_vec(lines)[source]#
dpti.lib.lmp.get_natomtypes(lines)[source]#
dpti.lib.lmp.get_posi(lines)[source]#
dpti.lib.lmp.lmpbox2box(lohi, tilt)[source]#
dpti.lib.lmp.system_data(lines)[source]#
dpti.lib.lmp.to_system_data(lines)[source]#

dpti.lib.ovito_file_convert module#

dpti.lib.utils module#

dpti.lib.utils.block_avg(inp, skip=0, block_size=10)[source]#
dpti.lib.utils.compute_nrefine(all_t, integrand, err, error_scale=None)[source]#
dpti.lib.utils.copy_file_list(file_list, from_path, to_path)[source]#
dpti.lib.utils.create_dict_not_empty_key(**kwargs)[source]#
dpti.lib.utils.create_path(path)[source]#
dpti.lib.utils.cvt_conf(fin, fout, ofmt='vasp')[source]#

Format convert from fin to fout, specify the output format by ofmt.

dpti.lib.utils.get_file_md5(file_path)[source]#
dpti.lib.utils.get_first_matched_key_from_dict(dct, lst)[source]#
dpti.lib.utils.get_task_file_abspath(task_name, file_name)[source]#
dpti.lib.utils.integrate(xx, yy, ye, scheme_='s')[source]#
dpti.lib.utils.integrate_range(xx, yy, ye, scheme='s')[source]#
dpti.lib.utils.integrate_range_hti(all_lambda, de, de_err, scheme='s')[source]#
dpti.lib.utils.integrate_range_simpson(xx, yy, ye)[source]#
dpti.lib.utils.integrate_range_trapezoidal(xx, yy, ye)[source]#
dpti.lib.utils.integrate_simpson(xx, yy, ye)[source]#
dpti.lib.utils.integrate_simpson_nonuniform(x, f, fe)[source]#
dpti.lib.utils.integrate_sys_err(xx, yy, scheme_='s')[source]#
dpti.lib.utils.integrate_sys_err_simpson(xx, yy)[source]#
dpti.lib.utils.integrate_sys_err_trapezoidal(xx, yy)[source]#
dpti.lib.utils.integrate_trapezoidal(xx, yy, ye)[source]#
dpti.lib.utils.interval_sys_err_trapezoidal(xx, yy, mode)[source]#
dpti.lib.utils.make_iter_name(iter_index)[source]#
dpti.lib.utils.parse_seq(in_s, *, protect_eps=None)[source]#

dpti.lib.vasp module#

dpti.lib.vasp.perturb_xz(poscar_in, poscar_out, pert=0.01)[source]#
dpti.lib.vasp.poscar_natoms(poscar_in)[source]#
dpti.lib.vasp.poscar_scale(poscar_in, poscar_out, scale)[source]#
dpti.lib.vasp.poscar_vol(poscar_in)[source]#
dpti.lib.vasp.reciprocal_box(box)[source]#
dpti.lib.vasp.regulate_poscar(poscar_in, poscar_out)[source]#
dpti.lib.vasp.sort_poscar(poscar_in, poscar_out, new_names)[source]#

dpti.lib.water module#

dpti.lib.water.add_bonds(lines_, max_roh=1.3)[source]#
dpti.lib.water.compute_bonds(box, atype, posis, max_roh=1.3, uniq_hbond=True)[source]#
dpti.lib.water.dist_via_oh_list(box, posis, list_oh)[source]#
dpti.lib.water.min_ho(box, atype, posis)[source]#
dpti.lib.water.min_oh_list(box, atype, posis)[source]#
dpti.lib.water.min_oho(box, atype, posis)[source]#
dpti.lib.water.min_oo(box, atype, posis)[source]#
dpti.lib.water.posi_diff(box, r0, r1)[source]#
dpti.lib.water.posi_shift(box, r0, r1)[source]#