Job
DFControl.DFJob
— Type.Represents a full DFT job with multiple input files and calculations.
DFControl.DFJob
— Type.DFJob(job_dir::String, T=Float64; job_fuzzy = "job", new_job_name=nothing, new_local_dir=nothing, server=getdefault_server(),server_dir="")
Loads and returns a local DFJob. If local_dir is not specified the job directory will be registered as the local one.
DFControl.DFJob
— Type.DFJob(server_dir::String, local_dir::String, server=getdefault_server(); job_fuzzy="*job*", new_job_name="")
Pulls a server job to local directory and then loads it. A fuzzy search for the job file will be performed and the found input files will be pulled.
DFControl.abort
— Method.abort(job::DFJob)
Will look for the job id inside it's metadata and try to remove it from the server queue. If the lastrunning input happened to be a QE input, the correct abort file will be written. If it's Wannier90 the job will be brutally removed from the slurm queue. EDIT: It's absolutely impossible to gracefully abort a multi job script with QE... for later
DFControl.addcalc!
— Function.Creates a new DFInput
from the template with the new flags and new data, then adds it to the inputs of the job at the specified index.
DFControl.addcalc!
— Method.addcalc!(job::DFJob, kpoints::Vector{NTuple{4}}, newflags...; name="bands", run=true, template="scf")
Searches for the given template and creates a bands calculation from it.
DFControl.addcalc!
— Method.addcalc!(job::DFJob, kpoints::NTuple{6}, newflags...; name="scf", run=true, template="nscf")
Searches for the given template and creates a bands calculation from it.
DFControl.addcalc!
— Method.addcalc!(job::DFJob, kpoints::NTuple{3}, newflags...; name="nscf", run=true, template="scf")
Searches for the given template and creates a bands calculation from it.
DFControl.addwancalc!
— Method.addwancalc!(job::DFJob, nscf::DFInput{QE}, projections;
Emin=-5.0,
Epad=5.0,
wanflags=SymAnyDict(),
pw2wanexec=Exec("pw2wannier90.x", nscf.execs[2].dir, nscf.execs[2].flags),
wanexec=Exec("wannier90.x", nscf.execs[2].dir),
bands=readbands(nscf))
Adds a wannier calculation to a job. For now only works with QE.
DFControl.atom
— Function.Returns the ith atom with id atsym
.
DFControl.atoms
— Method.atoms(job::DFJob)
Returns a list the atoms in the structure.
DFControl.data
— Method.data(job::DFJob, name::String, dataname::Symbol)
Looks through the calculation filenames and returns the data with the specified symbol.
DFControl.execs
— Method.Returns the executables attached to a given input.
DFControl.flag
— Method.flag(job::DFJob, inputs::Vector{<:DFInput}, flag_name::Symbol)
Looks through the input names and returns the value of the specified flag.
DFControl.flag
— Method.flag(job::DFJob, flag_name::Symbol)
Looks through all the calculations and returns the value of the specified flag.
DFControl.inputs
— Function.inputs(job::DFJob, names::Vector)
Returns an array of the inputs that match the names.
DFControl.outpath
— Method.Finds the input corresponding to the name and returns the full output path.
DFControl.outputdata
— Method.Finds the output files for each of the inputs of a job, and groups all found data into a dictionary.
DFControl.projections
— Function.Returns the projections inside the job for the specified i
th atom in the job with id atsym
.
DFControl.projections
— Method.Returns all the projections inside the job.
DFControl.rmflags!
— Method.rmflags!(job::DFJob, inputs::Vector{<:DFInput}, flags...)
Looks through the input names and removes the specified flags.
DFControl.save
— Function.save(job::DFJob)
Saves a DFJob, it's job file and all it's input files.
DFControl.setatoms!
— Method.setatoms!(job::DFJob, atoms::Dict{Symbol,<:Array{<:Point3,1}}, pseudo_setname=nothing, pseudospecifier=nothing, option=:angstrom)
Sets the data data with atomic positions to the new one. This is done for all calculations in the job that have that data. If default pseudopotentials are defined, a set can be specified, together with a fuzzy that distinguishes between the possible multiple pseudo strings in the pseudo set. These pseudospotentials are then set in all the calculations that need it. All flags which specify the number of atoms inside the calculation also gets set to the correct value.
DFControl.setcell!
— Method.setcell_parameters!(job::DFJob, cell_::Mat3)
sets the cell parameters of the structure in the job.
DFControl.setdata!
— Method.setdata!(job::DFJob, inputs::Vector{<:DFInput}, dataname::Symbol, data; option=nothing)
Looks through the calculation filenames and sets the data of the datablock with data_block_name
to new_block_data
. if option is specified it will set the block option to it.
DFControl.setdataoption!
— Method.setdataoption!(job::DFJob, names::Vector{String}, dataname::Symbol, option::Symbol)
sets the option of specified data in the specified inputs.
DFControl.setdataoption!
— Method.setdataoption!(job::DFJob, name::Symbol, option::Symbol)
sets the option of specified data block in all calculations that have the block.
DFControl.setexecflags!
— Method.setexecflags!(job::DFJob, exec, flags...)
Goes through the calculations of the job and if the name contains any of the inputnames
it sets the exec flags to the specified ones.
DFControl.setflags!
— Method.setflags!(job::DFJob, inputs::Vector{<:DFInput}, flags...; print=true)
Sets the flags in the names to the flags specified. This only happens if the specified flags are valid for the names. If necessary the correct control block will be added to the calculation (e.g. for QEInputs).
The values that are supplied will be checked whether they are valid.
DFControl.setflow!
— Method.setflow!(job::DFJob, should_runs...)
Sets whether or not calculations should be run. Calculations are specified using their indices.
DFControl.setheaderword!
— Method.setheaderword!(job::DFJob, word::String, new_word::String)
Replaces the specified word in the header with the new word.
DFControl.setkpoints!
— Method.setkpoints!(job::DFJob, n, k_points)
sets the data in the k point DataBlock
inside the specified inputs.
DFControl.setlocaldir!
— Method.Sets the local dir of the job.
DFControl.setprojections!
— Method.sets the projections of the specified atoms inside the job structure.
DFControl.setpseudos!
— Function.sets the pseudopotentials to the specified one in the default pseudoset.
DFControl.setserverdir!
— Method.Sets the server dir of the job.
DFControl.setwanenergies!
— Method.Automatically calculates and sets the wannier energies. This uses the projections, Emin
and the bands to infer the other limits. Epad
allows one to specify the padding around the inner and outer energy windows
DFControl.submit
— Method.submit(job::DFJob; server=job.server, server_dir=job.server_dir)
Saves the job locally, and then either runs it locally using qsub
(when job.server == "localhost"
) or sends it to the specified job.server
in job.server_dir
, and submits it using qsub
on the server.
DFControl.undo!
— Method.undo!(job::DFJob)
Undos the last set to the calculations of the job.
DFControl.undo
— Method.undo(job::DFJob)
Returns the previous state of the job.