run module

run.addatexit__(command, *args, **kwargs)[source]

Wrapper to add function to be run at exit

Parameters:
  • command (func) – function to be run
  • *args – arguments for command
Keyword Arguments:
 

**kwargs – Keyword arguments for command

Returns:

None

run.bands(calcs, engine='', execPrefix=None, execPostfix=' ', holdFlag=True, config=None)[source]

Wrapper to set up Electronic Band Structure calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.clean_cell_params(output)[source]

Parses the atomic shifts in a supercell from fd.x outputted pw.x input files to correct for formatting issues when they are imported to AFLOWpi

Parameters:output (str) – pw.x input files generated by fd.x
Keyword Arguments:
 None
Returns:pw.x input files generated by fd.x (cleaned by AFLOWpi)
Return type:output (str)
run.cleanup(calcs)[source]

Deletes all files a calculation set’s directory tree that are prepended with ‘_’

Parameters:calcs (dict) – Dictionary of dictionaries of calculations
Keyword Arguments:
 None
Returns:None
run.dos(calcs, engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None)[source]

Wrapper to set up DOS nscf calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.emr(calcs, engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None)[source]

Wrapper to set up GIPAW EMR calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.generateSubRef(qsubRefFileString, oneCalc, ID)[source]

Reads in the reference cluster submission file specified in “jobreffile” in the config used. Tries to insert a few parameters.

OBSOLETE PLANNED FOR REMOVAL

Parameters:
  • qsubRefFileString (str) – string of the “reference” cluster submission file
  • oneCalc (dict) – dictionary of one of the calculations
  • ID (str) – ID of calculation
Keyword Arguments:
 

None

Returns:

string cluster submission file

Return type:

clusterTypeDict (dict)

run.gvectors(calcs, engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None)[source]

Wrapper to set up GIPAW gvectors calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.hyperfine(calcs, engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None, isotope=())[source]

Wrapper to set up GIPAW hyperfine calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.nmr(calcs, engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None)[source]

Wrapper to set up GIPAW NMR calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.pdos(calcs, engine='', execPrefix=None, execPostfix='', holdFlag=True, config=None)[source]

Wrapper to set up DOS projection calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL
Returns:

None

run.prep_fd(__submitNodeName__, oneCalc, ID, nrx1=2, nrx2=2, nrx3=2, innx=2, de=0.01, atom_sym=True, disp_sym=True, proj_phDOS=True)[source]

Generates input files for fd.x, fd_ifc.x, and matdyn.x for the finite difference phonon calculations.

Parameters:
  • __submitNodeName__ (str) – String of hostname that cluster jobs should be submitted from
  • oneCalc (dict) – dictionary of one of the calculations
  • ID (str) – ID of calculation
Keyword Arguments:
 
  • nrx1 (int) – supercell size for first primitive lattice vector
  • nrx2 (int) – supercell size for second primitive lattice vector
  • nrx3 (int) – supercell size for third primitive lattice vector
  • innx (int) – how many differernt shifts in each direction for finite difference phonon calculation
  • de (float) – amount to shift the atoms for finite differences
Returns:

None

run.reduce_kpoints(inputfile, factor)[source]
run.reset_logs(calcs)[source]

Removes log files from AFLOWpi directory

Parameters:calcs (dict) – Dictionary of dictionaries of calculations
Keyword Arguments:
 None
Returns:None
run.resubmit(calcs)[source]

Stages loaded calculation set to be resubmitted on a cluster

Parameters:calcs (dict) – Dictionary of dictionaries of calculations
Keyword Arguments:
 None
Returns:None
run.scf(calcs, engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None, exit_on_error=True)[source]

Wrapper to set up self-consitent calculation

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
  • holdFlag (bool) – DEFUNCT. NEEDS REMOVAL
  • config (str) – DEFUNCT. NEEDS REMOVAL

Returns:

run.submit()[source]

sets global __submit__flag__ so calculations will start when user script completes

Parameters:None
Keyword Arguments:
 None
Returns:None
run.submitFirstCalcs__(calcs)[source]

Submits the first step of a calculation’s pipeline

Parameters:calcs (dict) – Dictionary of dictionaries of calculations
Keyword Arguments:
 None
Returns:None
run.testOne(calcs, calcType='scf', engine='', execPrefix=None, execPostfix=None, holdFlag=True, config=None)[source]

Run all the calculation in the dictionary with a specific engine

Parameters:

calcs (dict) – Dictionary of dictionaries of calculations

Keyword Arguments:
 
  • engine (str) – executable that you are calling to run the calculations
  • execPrefix (str) – commands to go before the executable when run (ex. mpiexec nice -n 19 <executable>) (default = None)
  • execPostfix (str) – commands to go after the executable when run (ex. <execPrefix> <executable> -ndiag 12 -nimage 2) (default = None)
Returns:

None

run.write_fdx_template(oneCalc, ID, nrx1=2, nrx2=2, nrx3=2, innx=2, de=0.01, atom_sym=True, disp_sym=True, proj_phDOS=True)[source]

Generates input files for fd.x, fd_ifc.x, and matdyn.x for the finite difference phonon calculations.

Parameters:
  • oneCalc (dict) – dictionary of one of the calculations
  • ID (str) – ID of calculation
Keyword Arguments:
 
  • nrx1 (int) – supercell size for first primitive lattice vector
  • nrx2 (int) – supercell size for second primitive lattice vector
  • nrx3 (int) – supercell size for third primitive lattice vector
  • innx (int) – how many differernt shifts in each direction for finite difference phonon calculation
  • de (float) – amount to shift the atoms for finite differences
Returns:

None