build_structures_set_from_nomad

Command-line usage

usage: cell build_structures_set_from_nomad [-h] [-ps 100]
                                            [-u https://sol-oasis.physik.hu-berlin.de/nomad-oasis/api/v1/]
                                            [-e None] [-n None] [-p None]
                                            [-ss sset.db]
                                            [-ad atoms_relaxed.db]
                                            [-sad False] [-pl plat.json]
                                            [-spl False] [-oe False]
                                            [-te False] [-bg False]
                                            [-lp False] [-nlp False]
                                            dataset_id

positional arguments:
  dataset_id            NOMAD dataset ID from which to retrieve entries.

options:
  -h, --help            show this help message and exit
  -ps, --pagination-page-size 100
                        Maximum number of dataset entries to retrieve.
  -u, --base-url https://sol-oasis.physik.hu-berlin.de/nomad-oasis/api/v1/
                        Base URL of the NOMAD / NOMAD OASIS API.
  -e, --path-to-dotenv None
                        Path to .env file containing OASIS_USER_NAME and
                        OASIS_PASSWORD.
  -n, --username None   Username for the NOMAD / NOMAD OASIS account.
  -p, --userpassword None
                        Password for the NOMAD / NOMAD OASIS account.
  -ss, --sset-filepath sset.db
                        Output path for the serialized StructuresSet database.
  -ad, --atoms-db-filepath atoms_relaxed.db
                        Output path for the ASE database containing relaxed
                        atoms.
  -sad, --save-atoms-db False
                        If True, write relaxed atoms to the ASE database.
  -pl, --parent-lattice-filepath plat.json
                        Output path for the serialized parent lattice.
  -spl, --save-parent-lattice False
                        If True, serialize the dataset parent lattice.
  -oe, --include-oasis-entry-id False
                        Add NOMAD entry IDs as the oasis_entry_id property.
  -te, --include-total-energy-ev False
                        Add total energies as the total_energy_ev property.
  -bg, --include-band-gap-ev False
                        Add band gaps as the band_gap_ev property.
  -lp, --include-lattice-params False
                        Add raw a, b, c, alpha, beta, and gamma lattice
                        parameters.
  -nlp, --include-normalized-lattice-params False
                        Add normalized a_norm, b_norm, c_norm, alpha_norm,
                        beta_norm, and gamma_norm properties.

Arguments and behavior

clusterx.cli.build_structures_set_from_nomad.build_structures_set_from_nomad(dataset_id, pagination_page_size=100, base_url='https://sol-oasis.physik.hu-berlin.de/nomad-oasis/api/v1/', path_to_dotenv=None, username=None, userpassword=None, sset_filepath='sset.db', atoms_db_filepath='atoms_relaxed.db', save_atoms_db=False, parent_lattice_filepath='plat.json', save_parent_lattice=False, include_oasis_entry_id=False, include_total_energy_ev=False, include_band_gap_ev=False, include_lattice_params=False, include_normalized_lattice_params=False)

Build a StructuresSet and related files from a NOMAD dataset.

Dataset properties are added only when their corresponding include_* option is set to True. All property options default to False. include_lattice_params adds the raw a, b, c, alpha, beta, and gamma values. include_normalized_lattice_params adds the corresponding parent-lattice-normalized values with _norm suffixes.

The parent lattice is serialized only when save_parent_lattice is True. Relaxed atoms are written only when save_atoms_db is True. Credentials can be supplied directly or loaded from a dotenv file; otherwise, the command prompts.

Examples

$ cell build_structures_set_from_nomad DATASET_ID \
    --path-to-dotenv=.env --sset-filepath=sset.db

In a TOML input file, explicitly enable only the properties you want:

[build_structures_set_from_nomad]
dataset_id = "DATASET_ID"
include_total_energy_ev = true
include_band_gap_ev = true
include_lattice_params = true
include_normalized_lattice_params = true
include_oasis_entry_id = false
save_atoms_db = true
save_parent_lattice = true