Searchers

A Searcher is the main object representing all the data related with a global search. Most interactions can be performed from the command line using the romeo searcher subset of commands. Each Searcher is assigned a label or name with which it can be identified.

Data

The name also references the sub directory where all the data will be stored, which can be retrieved using dirname. This data consists of:

  • $(DATABASE_VERSION)/ledger.jld2: stores all the search data that is kept in memory during the search. See load and save
  • job_backups: a directory storing all the input and output data of the various calculations ran during the search
  • log.log: file that keeps a log of everything that happens during the search. The amount of information logged can be tuned using different levels passed to --verbosity <n> flag of romeo searcher create or romeo searcher start
  • HTTP.log: file holding all HTTP related logs
  • report.out: a report generated when a Searcher is finished

CommandLine

Most interaction with a Searcher can be done through the command line using the romeo searcher subcommands (use -h to show more info on commands and flags). The most important ones are:

  • romeo searcher create: interactive wizard to initialize and start a new Searcher, see setup_search
  • romeo searcher start: starts a Searcher
  • romeo searcher stop: stops a Searcher
  • romeo searcher status: shows a status overview
  • romeo searcher unload: unloads a Searcher from the orchestrator
  • romeo searcher log: opens the log.log file in the editor specified by the \$EDITOR environment variable
  • romeo searcher plot: creates a standard State plot
  • romeo searcher mode: sets the mode, see Modes for more information

Life Cycle

The lifecycle of a Searcher can be summarized by the following steps:

  1. Potential geometry and U parameter optimization when --hp-base or --relax-base are passed to romeo searcher create
  2. Initial unconstrained scf calculation to determine the number of electrons in the target manifold.
  3. Random search with --nrand trials
  4. Based on the unique States found in 3. (determined by --unique-thr) perform midpoint intersections (n = (n1 + n2)/2) between each pair of unique states
  5. repeat 4. for each newly found unique state
  6. if no new intersections can be created and the stopcondition is not yet reached go to step 3.
  7. if the stop condition determined by --stopping-unique-ratio and --stopping-n-generations is reached switch to postprocess mode
  8. if all jobs are finished and the stop condition is still satisfied, stop the Searcher and print results to report.out, otherwise switch back to 3.

Modes

There several execution modes that a Searcher can be in:

  • search: search mode characterized by performing intersection and random search, and postprocessing on unique States.
  • postprocess: when the stopcondition is satisfied, no new intersections or random trials will be generated, and only postprocessing actions will be taken
  • cleanup: no new trials or postprocessing jobs will be created and submitted, only cleanup of the currently running jobs will be performed, after which the Searcher will finish
  • manual: only used when performing manual tasks and you don't want any searching or postprocessing to happen automatically

These can be set using romeo searcher mode.

Reference

RomeoDFT.setup_searchFunction
setup_search(name, scf_file, structure_file=scf_file; kwargs...)

Creates and saves a new Searcher with name taking the pw input parameters from the template scf_file and the structure from structure_file, which can be either a pw input or a .cif file. This is the backend method used for the romeo searcher create from the command line.

Structure Kwargs

  • primitive=false: set this to true to first try to find the primitive unit cell
  • supercell=[1,1,1]: number specifying the number of unit cells along a, b and c direction
  • pseudoset=nothing: label (string) of pseudoset to use, if this is nothing it will trigger interactive setup
  • U_values=nothing: Dict{Symbol, Float64} of U values to use for the constrained manifolds if it is nothing it will trigger interactive setup

Control Kwargs

  • verbosity=0: the logging verbosity, higher = more. See Data for more info
  • sleep_time=30: time in seconds between update polls of the Searcher
  • server=nothing: label of Server on which to run everything
  • exec=nothing: label of the pw.x executable on server to use for the search
  • environment=nothing: label of the Environment to use for running all calculations
  • priority=nothing: number signifying the priority of the Searcher

Search Kwargs

  • nrand=10: how many random trials should be performed in a random search generation
  • unique_thr=0.1: threshold that determines the uniqueness of electronic states (uses sssp_distance)
  • mindist_ratio=0.25: minimum distance a trial should have to previous trials and unique states, defined as the ratio of the mean distance between current unique states
  • stopping_unique_ratio=0.2: the ratio of new found unique states to trials in a generation below which the searching will stop
  • stopping_n_generations=3: the search will stop if for this amount of successive generations the unique to trial ratio is lower than the stopping_unique_ratio
  • Hubbard_maxstep=100: maximum constraining steps
  • Hubbard_mixing_beta=0.4: mixing used to update the constraints during scf iterations
  • Hubbard_strength=1.0: strength of the constraining potential
  • Hubbard_conv_thr=0.1: threshold euclidean distance per atom between trial and current occupation matrices after which the constraints are released
  • electron_maxstep=500: see QE documentation

Pre/Post processing Kwargs:

  • relax_unique=false: whether a structural relaxation should be ran on each unique state
  • relax_base=false: whether a relaxation should be ran so the search happens for the relaxed structure
  • relax_force_convergence_threshold=1e-3: forc_conv_thr in QE
  • relax_energy_convergence_threshold=1e-4: energy_conv_thr in QE
  • relax_ion_dynamics="bfgs": ion_dynamics in QE
  • relax_cell_dynamics="bfgs": cell_dynamics in QE
  • relax_no_symmetry=false: whether symmetry should be released during relaxation
  • relax_no_variable_cell=false: whether the cell should be relaxed (false) or just the atomic positions (true)
  • hp_base=false: whether to calculate U parameters self-consistently before starting the search
  • hp_unique=false: whether to recalculate U self-consistently for each unique state
  • hp_nq=(2,2,2): nq1, nq2, nq3 in hp.x input
  • hp_conv_thr_chi=1e-4: conv_thr_chi in hp.x input
  • hp_find_atpert=2: find_atpert in hp.x input
  • hp_U_conv_thr=0.1: threshold for self-consistency of U
source
RemoteHPC.loadMethod
load(s::Searcher; version)

Loads the Searcher data from disk, from the ledger.jld2 that is associated with the latest Database version if version is unspecified. See Data for more info.

Example

s = load(Searcher("my_searcher_name"))
source
RomeoDFT.sssp_distanceFunction
sssp_distance(bands1, bands2, fermi)

Calculates

\[\sqrt{\frac{\sum_{mk} f_{mk} (\varepsilon^1_{mk} - \varepsilon^2_{mk} + \Delta)^2}{\sum_{mk}f_{mk}}}\]

for bands1 and bands2 flattened bandstructures. fermi is used to crudely determine $f_{mk}$ and $\Delta$ is optimized to minimize the distance.

source