Components (Settings, Job, ...)
*******************************

This section contains a description of all components (classes,
functions, decorators) that can be used within PLAMS scripts. In each
section you can find the API specification of a particular component,
an explanation of its role in the whole environment, and examples of
usage.

* Settings

  * Tree-like structure

  * Dot notation

  * Case sensitivity

  * API

    * "Settings"

      * "Settings.__init__()"

      * "Settings.copy()"

      * "Settings.soft_update()"

      * "Settings.update()"

      * "Settings.merge()"

      * "Settings.remove()"

      * "Settings.difference()"

      * "Settings.find_case()"

      * "Settings.get()"

      * "Settings.pop()"

      * "Settings.popitem()"

      * "Settings.setdefault()"

      * "Settings.as_dict()"

      * "Settings.suppress_missing()"

      * "Settings.contains_nested()"

      * "Settings.get_nested()"

      * "Settings.set_nested()"

      * "Settings.pop_nested()"

      * "Settings.nested_keys()"

      * "Settings.block_keys()"

      * "Settings.compare()"

      * "Settings.flatten()"

      * "Settings.unflatten()"

      * "Settings.__iter__()"

      * "Settings.__missing__()"

      * "Settings.__contains__()"

      * "Settings.__getitem__()"

      * "Settings.__setitem__()"

      * "Settings.__delitem__()"

      * "Settings.__getattr__()"

      * "Settings.__setattr__()"

      * "Settings.__delattr__()"

      * "Settings._str()"

      * "Settings.__str__()"

      * "Settings.__dir__()"

      * "Settings.__repr__()"

      * "Settings.__isub__()"

      * "Settings.__sub__()"

  * Global settings

    * "config_context()"

    * "get_config()"

    * "ConfigSettings"

      * "ConfigSettings.__init__()"

      * "ConfigSettings.init"

      * "ConfigSettings._explicit_init"

      * "ConfigSettings.preview"

      * "ConfigSettings.sleepstep"

      * "ConfigSettings.ignore_failure"

      * "ConfigSettings.daemon_threads"

      * "ConfigSettings.atexit_timeout"

      * "ConfigSettings.erase_workdir"

      * "ConfigSettings.jobmanager"

      * "ConfigSettings.job"

      * "ConfigSettings.log"

      * "ConfigSettings.saferun"

      * "ConfigSettings.default_jobrunner"

      * "ConfigSettings.default_jobmanager"

      * "ConfigSettings._check_initialized()"

    * "JobSettings"

      * "JobSettings.__init__()"

      * "JobSettings.pickle"

      * "JobSettings.pickle_protocol"

      * "JobSettings.keep"

      * "JobSettings.save"

      * "JobSettings.runscript"

      * "JobSettings.link_files"

      * "JobSettings.OnStatusChangeCallback"

        * "JobSettings.OnStatusChangeCallback.__init__()"

        * "JobSettings.OnStatusChangeCallback.__subclasshook__()"

        * "JobSettings.OnStatusChangeCallback.__weakref__"

        * "JobSettings.OnStatusChangeCallback.__call__()"

      * "JobSettings.on_status_change"

    * "JobManagerSettings"

      * "JobManagerSettings.__init__()"

      * "JobManagerSettings.counter_len"

      * "JobManagerSettings.hashing"

      * "JobManagerSettings.remove_empty_directories"

    * "LogSettings"

      * "LogSettings.__init__()"

      * "LogSettings.file"

      * "LogSettings.stdout"

      * "LogSettings.csv"

      * "LogSettings.time"

      * "LogSettings.date"

    * "RunScriptSettings"

      * "RunScriptSettings.__init__()"

      * "RunScriptSettings.shebang"

      * "RunScriptSettings.stdout_redirect"

    * "SafeRunSettings"

      * "SafeRunSettings.__init__()"

      * "SafeRunSettings.repeat"

      * "SafeRunSettings.delay"

* Jobs

  * Preparing a job

    * Contents of job settings

    * Default settings

  * Running a job

    * Name conflicts

    * Prerun and postrun methods

    * Preview mode

  * Job API

    * "Job"

      * "Job.__init__()"

      * "Job.status"

      * "Job.status_log"

      * "Job.run()"

      * "Job.pickle()"

      * "Job.ok()"

      * "Job.check()"

      * "Job.get_errormsg()"

      * "Job.hash()"

      * "Job.prerun()"

      * "Job.postrun()"

      * "Job._get_ready()"

      * "Job._execute()"

      * "Job.rename()"

      * "Job.__getstate__()"

      * "Job._log_status()"

      * "Job._full_name()"

  * Single jobs

    * "SingleJob"

      * "SingleJob.__init__()"

      * "SingleJob.get_input()"

      * "SingleJob.get_runscript()"

      * "SingleJob.hash_input()"

      * "SingleJob.hash_runscript()"

      * "SingleJob.hash()"

      * "SingleJob.check()"

      * "SingleJob.full_runscript()"

      * "SingleJob._get_ready()"

      * "SingleJob._execute()"

      * "SingleJob.load()"

      * "SingleJob.load_external()"

    * Subclassing SingleJob

  * Multijobs

    * "MultiJob"

      * "MultiJob.__init__()"

      * "MultiJob.new_children()"

      * "MultiJob.hash()"

      * "MultiJob.check()"

      * "MultiJob.other_jobs()"

      * "MultiJob.remove_child()"

      * "MultiJob._get_ready()"

      * "MultiJob.__iter__()"

      * "MultiJob._notify()"

      * "MultiJob._execute()"

      * "MultiJob.apply_to_children()"

    * Using MultiJob

* Results

  * Files in the job folder

  * Synchronization of parallel job executions

    * Examples

  * Cleaning job folder

    * Cleaning for multijobs

  * API

    * "Results"

      * "Results.__init__()"

      * "Results.refresh()"

      * "Results.collect()"

      * "Results.wait()"

      * "Results.grep_file()"

      * "Results.grep_output()"

      * "Results.read_file()"

      * "Results.regex_file()"

      * "Results.awk_file()"

      * "Results.awk_output()"

      * "Results.rename()"

      * "Results.get_file_chunk()"

      * "Results.get_output_chunk()"

      * "Results.recreate_molecule()"

      * "Results.recreate_settings()"

      * "Results._clean()"

      * "Results._copy_to()"

      * "Results._export_attribute()"

      * "Results._replace_job_name()"

      * "Results.__getitem__()"

      * "Results.__contains__()"

      * "Results._process_file()"

    * "ApplyRestrict"

      * "ApplyRestrict.__init_subclass__()"

      * "ApplyRestrict.__weakref__"

    * "_caller_name_and_arg()"

    * "_privileged_access()"

* Job runners

  * Local job runner

    * "JobRunner"

      * "JobRunner.__init__()"

      * "JobRunner.parallel"

      * "JobRunner.maxjobs"

      * "JobRunner.maxthreads"

      * "JobRunner.call()"

      * "JobRunner._run_job()"

    * "_MetaRunner"

      * "_MetaRunner.__new__()"

    * "_limit()"

    * "_in_thread()"

  * Remote job runner

    * "GridRunner"

      * "GridRunner.__init__()"

      * "GridRunner.call()"

      * "GridRunner._check_queue()"

      * "GridRunner._autodetect()"

* Job manager

  * Rerun prevention

  * Pickling

  * Restarting scripts

  * API

    * "JobManager"

      * "JobManager.__init__()"

      * "JobManager.workdir"

      * "JobManager.current_dir_for_jobs"

      * "JobManager.job_logger"

      * "JobManager.load_job()"

      * "JobManager.rename_job()"

      * "JobManager.remove_job()"

      * "JobManager._register()"

      * "JobManager._check_hash()"

      * "JobManager._clean()"

* Public functions

  * "init()"

  * "finish()"

  * "jobs_in_directory()"

  * "load()"

  * "load_all()"

  * "read_molecules()"

  * "read_all_molecules_in_xyz_file()"

  * Logging

    * "log()"

  * Binding decorators

    * "add_to_instance()"

* Molecule

  * Molecule

    * "Molecule"

      * "Molecule.__init__()"

      * "Molecule.copy()"

      * "Molecule.add_molecule()"

      * "Molecule._validate_atom()"

      * "Molecule._validate_bond()"

      * "Molecule.add_atom()"

      * "Molecule.delete_atom()"

      * "Molecule.delete_atoms()"

      * "Molecule.add_bond()"

      * "Molecule.delete_bond()"

      * "Molecule.delete_all_bonds()"

      * "Molecule.find_bond()"

      * "Molecule.set_atoms_id()"

      * "Molecule.unset_atoms_id()"

      * "Molecule.neighbors()"

      * "Molecule.bond_matrix()"

      * "Molecule.separate()"

      * "Molecule.guess_bonds()"

      * "Molecule.guess_system_charge()"

      * "Molecule.guess_atomic_charges()"

      * "Molecule.in_ring()"

      * "Molecule.supercell()"

      * "Molecule.unit_cell_volume()"

      * "Molecule.cell_lengths()"

      * "Molecule.cell_angles()"

      * "Molecule.set_integer_bonds()"

      * "Molecule.index()"

      * "Molecule.round_coords()"

      * "Molecule.get_connection_table()"

      * "Molecule.get_molecule_indices()"

      * "Molecule.get_fragment()"

      * "Molecule.get_complete_molecules_within_threshold()"

      * "Molecule.locate_rings()"

      * "Molecule.locate_rings_acm()"

      * "Molecule.order_ring()"

      * "Molecule.locate_rings_networkx()"

      * "Molecule.shortest_path_dijkstra()"

      * "Molecule.translate()"

      * "Molecule.rotate_lattice()"

      * "Molecule.rotate()"

      * "Molecule.align_lattice()"

      * "Molecule.rotate_bond()"

      * "Molecule.resize_bond()"

      * "Molecule.closest_atom()"

      * "Molecule.distance_to_point()"

      * "Molecule.distance_to_mol()"

      * "Molecule.wrap()"

      * "Molecule.get_center_of_mass()"

      * "Molecule.get_masses()"

      * "Molecule.get_mass()"

      * "Molecule.get_density()"

      * "Molecule.set_density()"

      * "Molecule.get_formula()"

      * "Molecule.get_inertia_matrix()"

      * "Molecule.get_moments_of_inertia()"

      * "Molecule.get_gyration_radius()"

      * "Molecule.apply_strain()"

      * "Molecule.map_to_central_cell()"

      * "Molecule.perturb_atoms()"

      * "Molecule.perturb_lattice()"

      * "Molecule.substitute()"

      * "Molecule.map_atoms_to_bonds()"

      * "Molecule.__repr__()"

      * "Molecule.__len__()"

      * "Molecule.__str__()"

      * "Molecule.str()"

      * "Molecule.__iter__()"

      * "Molecule.__getitem__()"

      * "Molecule.__add__()"

      * "Molecule.__iadd__()"

      * "Molecule.__round__()"

      * "Molecule.__getstate__()"

      * "Molecule.__setstate__()"

      * "Molecule.as_dict()"

      * "Molecule.from_dict()"

      * "Molecule.from_elements()"

      * "Molecule.as_array"

      * "Molecule.from_array()"

      * "Molecule.__array__()"

      * "Molecule.readxyz()"

      * "Molecule.writexyz()"

      * "Molecule.readpdb()"

      * "Molecule.writepdb()"

      * "Molecule.readase()"

      * "Molecule.writease()"

      * "Molecule.hydrogen_to_deuterium()"

      * "Molecule._mol_from_rkf_section()"

      * "Molecule.forcefield_params_from_rkf()"

      * "Molecule.readin()"

      * "Molecule.writein()"

      * "Molecule.read()"

      * "Molecule.write()"

      * "Molecule.add_hatoms()"

      * "Molecule.rmsd()"

      * "Molecule.align2mol()"

      * "Molecule.assign_chirality()"

      * "Molecule.get_chirality()"

      * "Molecule.numbers"

      * "Molecule.symbols"

      * "Molecule._get_bond_id()"

      * "Molecule.get_unique_bonds()"

      * "Molecule.get_unique_angles()"

      * "Molecule.label()"

      * "Molecule.set_local_labels()"

      * "Molecule.find_permutation()"

    * Atom labeling

      * "label_atoms()"

      * "molecule_name()"

      * "initialize()"

      * "iterate()"

      * "clear()"

      * "new_name()"

      * "knock()"

      * "twist()"

      * "bend()"

      * "unique_atoms()"

  * Atom

    * "Atom"

      * "Atom.__init__()"

      * "Atom.str()"

      * "Atom.__str__()"

      * "Atom.__iter__()"

      * "Atom.translate()"

      * "Atom.move_to()"

      * "Atom.distance_to()"

      * "Atom.vector_to()"

      * "Atom.angle()"

      * "Atom.rotate()"

      * "Atom.neighbors()"

  * Bond

    * "Bond"

      * "Bond.__init__()"

      * "Bond.__str__()"

      * "Bond.__iter__()"

      * "Bond.is_aromatic()"

      * "Bond.length()"

      * "Bond.as_vector()"

      * "Bond.other_end()"

      * "Bond.resize()"

      * "Bond.rotate()"

  * RDKit interface

    * "add_Hs()"

    * "apply_reaction_smarts()"

    * "apply_template()"

    * "get_backbone_atoms()"

    * "modify_atom()"

    * "to_rdmol()"

    * "from_rdmol()"

    * "from_sequence()"

    * "from_smiles()"

    * "from_smarts()"

    * "to_smiles()"

    * "partition_protein()"

    * "readpdb()"

    * "writepdb()"

    * "get_substructure()"

    * "get_conformations()"

    * "yield_coords()"

    * "canonicalize_mol()"

    * "to_image()"

    * "get_reaction_image()"

  * ASE interface

    * "toASE()"

    * "fromASE()"

  * Packmol interface

    * "packmol()"

    * "packmol_around()"

    * "packmol_on_slab()"

    * "packmol_in_void()"

    * "packmol_microsolvation()"

* Utilities

  * Periodic Table

    * "PeriodicTable"

      * "PeriodicTable.__init__()"

      * "PeriodicTable.get_atomic_number()"

      * "PeriodicTable.get_symbol()"

      * "PeriodicTable.get_mass()"

      * "PeriodicTable.get_radius()"

      * "PeriodicTable.get_connectors()"

      * "PeriodicTable.get_metallic()"

      * "PeriodicTable.get_electronegative()"

      * "PeriodicTable.set_mass()"

      * "PeriodicTable.set_radius()"

      * "PeriodicTable.set_connectors()"

      * "PeriodicTable._get_property()"

      * "PeriodicTable.get_electron_affinity()"

      * "PeriodicTable.get_ionization_energy()"

  * Units

    * "Units"

      * "Units.__init__()"

      * "Units.conversion_ratio()"

      * "Units.convert()"

      * "Units.ascii2unicode()"

  * Geometry tools

    * "rotation_matrix()"

    * "axis_rotation_matrix()"

    * "distance_array()"

    * "angle()"

    * "dihedral()"

    * "cell_shape()"

    * "cellvectors_from_shape()"

  * File format conversion tools

    * "traj_to_rkf()"

    * "vasp_output_to_ams()"

    * "qe_output_to_ams()"

    * "gaussian_output_to_ams()"

    * "rkf_to_ase_traj()"

    * "rkf_to_ase_atoms()"

    * "file_to_traj()"

  * Reaction energies

    * "balance()"

    * "ReactionEquation"

      * "ReactionEquation.__init__()"

      * "ReactionEquation.prepare_state()"

      * "ReactionEquation.balance()"

      * "ReactionEquation.set_minimum_coefficients()"

      * "ReactionEquation.get_nullspace_basis()"

      * "ReactionEquation.get_reduced_basis()"

      * "ReactionEquation.setup_optimizer()"

      * "ReactionEquation.optimize_coefficients()"

      * "ReactionEquation.refine_optimization()"

      * "ReactionEquation.reactants"

      * "ReactionEquation.products"

      * "ReactionEquation.set_charges()"

      * "ReactionEquation.set_coefficients()"

      * "ReactionEquation.__format__()"

      * "ReactionEquation.__str__()"

      * "ReactionEquation.reaction_charge"

      * "ReactionEquation.matrix_as_string()"

      * "ReactionEquation._set_elements()"

      * "ReactionEquation._set_matrix()"

      * "ReactionEquation._elements_from_formula()"

      * "ReactionEquation.__weakref__"

    * "balance_equation()"

    * "reaction_energy()"

  * Plotting tools

    * "linear_fit_extrapolate_to_0()"

    * "plot_band_structure()"

    * "plot_phonons_band_structure()"

    * "plot_phonons_dos()"

    * "plot_phonons_thermodynamic_properties()"

    * "plot_molecule()"

    * "plot_image_grid()"

    * "plot_correlation()"

    * "plot_msd()"

    * "plot_work_function()"

    * "plot_grid_molecules()"

  * Postprocess results

    * "moving_average()"

    * "broaden_results()"

* Trajectories

  * XYZ trajectory files

    * "XYZTrajectoryFile"

      * "XYZTrajectoryFile.__init__()"

      * "XYZTrajectoryFile.style"

      * "XYZTrajectoryFile.store_historydata()"

      * "XYZTrajectoryFile.set_name()"

      * "XYZTrajectoryFile.read_next()"

      * "XYZTrajectoryFile.write_next()"

      * "XYZTrajectoryFile.__call__()"

      * "XYZTrajectoryFile._move_cursor_to_append_pos()"

      * "XYZTrajectoryFile._set_fileobject()"

      * "XYZTrajectoryFile.close()"

      * "XYZTrajectoryFile.connection_table"

      * "XYZTrajectoryFile.get_elements()"

      * "XYZTrajectoryFile.get_length()"

      * "XYZTrajectoryFile.get_plamsmol()"

      * "XYZTrajectoryFile.molecule"

      * "XYZTrajectoryFile.read_frame()"

      * "XYZTrajectoryFile.read_last_frame()"

      * "XYZTrajectoryFile.rewind()"

      * "XYZTrajectoryFile.set_elements()"

    * XYZ history files

      * "XYZHistoryFile"

        * "XYZHistoryFile.__init__()"

        * "XYZHistoryFile.write_next()"

  * RKF trajectory files

    * "RKFTrajectoryFile"

      * "RKFTrajectoryFile.__init__()"

      * "RKFTrajectoryFile._set_fileobject()"

      * "RKFTrajectoryFile.store_mddata()"

      * "RKFTrajectoryFile.store_historydata()"

      * "RKFTrajectoryFile.close()"

      * "RKFTrajectoryFile._rewrite_molecule()"

      * "RKFTrajectoryFile._set_mddata_items()"

      * "RKFTrajectoryFile._move_cursor_to_append_pos()"

      * "RKFTrajectoryFile._update_celldata()"

      * "RKFTrajectoryFile.get_plamsmol()"

      * "RKFTrajectoryFile.read_frame()"

      * "RKFTrajectoryFile._store_historydata_for_step()"

      * "RKFTrajectoryFile.read_next()"

      * "RKFTrajectoryFile.write_next()"

      * "RKFTrajectoryFile._set_energy()"

      * "RKFTrajectoryFile._write_dictionary_to_history()"

      * "RKFTrajectoryFile._flatten_variable()"

      * "RKFTrajectoryFile.rewind()"

      * "RKFTrajectoryFile.get_length()"

      * "RKFTrajectoryFile.read_last_frame()"

    * RKF history files

      * "RKFHistoryFile"

        * "RKFHistoryFile.__init__()"

        * "RKFHistoryFile.get_plamsmol()"

        * "RKFHistoryFile._rewrite_molecule()"

        * "RKFHistoryFile._correct_chemical_system()"

        * "RKFHistoryFile.write_next()"

        * "RKFHistoryFile._set_system_version_elements()"

  * DCD trajectory files

    * "DCDTrajectoryFile"

      * "DCDTrajectoryFile.__init__()"

      * "DCDTrajectoryFile.set_byteorder()"

      * "DCDTrajectoryFile.read_next()"

      * "DCDTrajectoryFile.write_next()"

      * "DCDTrajectoryFile.__call__()"

      * "DCDTrajectoryFile._move_cursor_to_append_pos()"

      * "DCDTrajectoryFile._set_fileobject()"

      * "DCDTrajectoryFile.close()"

      * "DCDTrajectoryFile.connection_table"

      * "DCDTrajectoryFile.get_elements()"

      * "DCDTrajectoryFile.get_length()"

      * "DCDTrajectoryFile.get_plamsmol()"

      * "DCDTrajectoryFile.molecule"

      * "DCDTrajectoryFile.read_frame()"

      * "DCDTrajectoryFile.read_last_frame()"

      * "DCDTrajectoryFile.rewind()"

      * "DCDTrajectoryFile.set_elements()"

  * Trajectory class

    * "Trajectory"

      * "Trajectory.run_analysis()"

* Job Analysis

  * Adding Jobs

  * Adding Analysis Fields

  * Modifying Analysis

  * Extracting Analysis

  * API

    * "JobAnalysis"

      * "JobAnalysis.__init__()"

      * "JobAnalysis.copy()"

      * "JobAnalysis.jobs"

      * "JobAnalysis.field_keys"

      * "JobAnalysis.get_analysis()"

      * "JobAnalysis._expand_analysis()"

      * "JobAnalysis.to_dataframe()"

      * "JobAnalysis.to_table()"

      * "JobAnalysis.display_table()"

      * "JobAnalysis.to_csv_file()"

      * "JobAnalysis.get_timeline()"

      * "JobAnalysis.display_timeline()"

      * "JobAnalysis.add_job()"

      * "JobAnalysis.remove_job()"

      * "JobAnalysis.load_job()"

      * "JobAnalysis.filter_jobs()"

      * "JobAnalysis.sort_jobs()"

      * "JobAnalysis.add_field()"

      * "JobAnalysis.set_field()"

      * "JobAnalysis.format_field()"

      * "JobAnalysis.rename_field()"

      * "JobAnalysis.expand_field()"

      * "JobAnalysis.collapse_field()"

      * "JobAnalysis.reorder_fields()"

      * "JobAnalysis.sort_fields()"

      * "JobAnalysis.remove_field()"

      * "JobAnalysis.remove_fields()"

      * "JobAnalysis.filter_fields()"

      * "JobAnalysis.remove_empty_fields()"

      * "JobAnalysis.remove_uniform_fields()"

      * "JobAnalysis.add_standard_fields()"

      * "JobAnalysis.add_standard_field()"

      * "JobAnalysis.get_settings_field_key()"

      * "JobAnalysis.add_settings_field()"

      * "JobAnalysis.add_settings_fields()"

      * "JobAnalysis.get_rkf_field_key()"

      * "JobAnalysis.add_rkf_field()"

      * "JobAnalysis.add_settings_input_fields()"

      * "JobAnalysis.remove_settings_fields()"

      * "JobAnalysis.__str__()"

      * "JobAnalysis.__repr__()"

      * "JobAnalysis.__getitem__()"

      * "JobAnalysis.__setitem__()"

      * "JobAnalysis.__delitem__()"

      * "JobAnalysis.__getattr__()"

      * "JobAnalysis.__setattr__()"

      * "JobAnalysis.__delattr__()"

      * "JobAnalysis.__contains__()"

* View

  * API

    * "view()"

    * "ViewConfig"

      * "ViewConfig.validate()"
