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. Seeloadandsavejob_backups: a directory storing all the input and output data of the various calculations ran during the searchlog.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 ofromeo searcher createorromeo searcher startHTTP.log: file holding all HTTP related logsreport.out: a report generated when aSearcheris 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 newSearcher, seesetup_searchromeo searcher start: starts aSearcherromeo searcher stop: stops aSearcherromeo searcher status: shows a status overviewromeo searcher unload: unloads aSearcherfrom the orchestratorromeo searcher log: opens thelog.logfile in the editor specified by the\$EDITORenvironment variableromeo searcher plot: creates a standardStateplotromeo searcher mode: sets the mode, see Modes for more information
Life Cycle
The lifecycle of a Searcher can be summarized by the following steps:
- Potential geometry and U parameter optimization when
--hp-baseor--relax-baseare passed toromeo searcher create - Initial unconstrained
scfcalculation to determine the number of electrons in the target manifold. - Random search with
--nrandtrials - Based on the unique
Statesfound in3.(determined by--unique-thr) perform midpoint intersections (n = (n1 + n2)/2) between each pair of unique states - repeat
4.for each newly found unique state - if no new intersections can be created and the stopcondition is not yet reached go to step
3. - if the stop condition determined by
--stopping-unique-ratioand--stopping-n-generationsis reached switch topostprocessmode - if all jobs are finished and the stop condition is still satisfied, stop the
Searcherand print results toreport.out, otherwise switch back to3.
Modes
There several execution modes that a Searcher can be in:
search: search mode characterized by performing intersection and random search, and postprocessing on uniqueStates.postprocess: when the stopcondition is satisfied, no new intersections or random trials will be generated, and onlypostprocessingactions will be takencleanup: no new trials or postprocessing jobs will be created and submitted, only cleanup of the currently running jobs will be performed, after which theSearcherwill finishmanual: 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.Searcher — TypeSearcher(name)Represents a global search with label name.
RomeoDFT.setup_search — Functionsetup_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 totrueto first try to find the primitive unit cellsupercell=[1,1,1]: number specifying the number of unit cells alonga,bandcdirectionpseudoset=nothing: label (string) of pseudoset to use, if this is nothing it will trigger interactive setupU_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 infosleep_time=30: time in seconds between update polls of theSearcherserver=nothing: label ofServeron which to run everythingexec=nothing: label of thepw.xexecutable onserverto use for the searchenvironment=nothing: label of theEnvironmentto use for running all calculationspriority=nothing: number signifying the priority of theSearcher
Search Kwargs
nrand=10: how many random trials should be performed in a random search generationunique_thr=0.1: threshold that determines the uniqueness of electronic states (usessssp_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 statesstopping_unique_ratio=0.2: the ratio of new found unique states to trials in a generation below which the searching will stopstopping_n_generations=3: the search will stop if for this amount of successive generations the unique to trial ratio is lower than thestopping_unique_ratioHubbard_maxstep=100: maximum constraining stepsHubbard_mixing_beta=0.4: mixing used to update the constraints during scf iterationsHubbard_strength=1.0: strength of the constraining potentialHubbard_conv_thr=0.1: threshold euclidean distance per atom between trial and current occupation matrices after which the constraints are releasedelectron_maxstep=500: see QE documentation
Pre/Post processing Kwargs:
relax_unique=false: whether a structural relaxation should be ran on each unique staterelax_base=false: whether a relaxation should be ran so the search happens for the relaxed structurerelax_force_convergence_threshold=1e-3:forc_conv_thrin QErelax_energy_convergence_threshold=1e-4:energy_conv_thrin QErelax_ion_dynamics="bfgs":ion_dynamicsin QErelax_cell_dynamics="bfgs":cell_dynamicsin QErelax_no_symmetry=false: whether symmetry should be released during relaxationrelax_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 searchhp_unique=false: whether to recalculate U self-consistently for each unique statehp_nq=(2,2,2):nq1,nq2,nq3in hp.x inputhp_conv_thr_chi=1e-4:conv_thr_chiin hp.x inputhp_find_atpert=2:find_atpertin hp.x inputhp_U_conv_thr=0.1: threshold for self-consistency of U
RemoteHPC.load — Methodload(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"))RemoteHPC.save — Methodsave(s::Searcher)Saves s to the standard location as specified in Data.
RomeoDFT.sssp_distance — Functionsssp_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.