principia_materia.io_interface package
Submodules
- principia_materia.io_interface.array_io module
- principia_materia.io_interface.base_data_wrapper module- BaseDataWrapper- BaseDataWrapper.add_item()
- BaseDataWrapper.copy()
- BaseDataWrapper.delete_item()
- BaseDataWrapper.dump()
- BaseDataWrapper.dumps()
- BaseDataWrapper.get_alias_map()
- BaseDataWrapper.get_all_names_aliases()
- BaseDataWrapper.load()
- BaseDataWrapper.loads()
- BaseDataWrapper.register_dtype()
- BaseDataWrapper.self_check()
- BaseDataWrapper.verify_data()
 
 
- principia_materia.io_interface.compute_job module- ComputeJob- ComputeJob.copy_files()
- ComputeJob.create_job()
- ComputeJob.get_born_effective_charges()
- ComputeJob.get_cutoff()
- ComputeJob.get_dielectric_tensor()
- ComputeJob.get_energy()
- ComputeJob.get_forces()
- ComputeJob.get_kmesh()
- ComputeJob.get_magnetic_moments()
- ComputeJob.get_natoms()
- ComputeJob.get_relaxation_displacement()
- ComputeJob.get_stress()
- ComputeJob.initialize_configuration()
- ComputeJob.is_job_finished
- ComputeJob.path
- ComputeJob.rescale_kmesh()
- ComputeJob.set_kmesh()
- ComputeJob.set_output()
- ComputeJob.structure
 
 
- principia_materia.io_interface.compute_job_series module- ComputeJobSeries- ComputeJobSeries.config_path
- ComputeJobSeries.create_directory()
- ComputeJobSeries.create_job()
- ComputeJobSeries.create_jobs()
- ComputeJobSeries.get_born_effective_charges_from_job()
- ComputeJobSeries.get_compute_job()
- ComputeJobSeries.get_dielectric_tensor_from_job()
- ComputeJobSeries.get_energy_from_job()
- ComputeJobSeries.get_forces_from_job()
- ComputeJobSeries.get_metadata_path()
- ComputeJobSeries.get_results_from_jobs()
- ComputeJobSeries.get_stress_from_job()
- ComputeJobSeries.save_metadata()
- ComputeJobSeries.series_exists
- ComputeJobSeries.set_static_files()
- ComputeJobSeries.structure
 
 
- principia_materia.io_interface.data_wrapper module
- principia_materia.io_interface.hdf5_wrapper module
- principia_materia.io_interface.jobs_db module- JobsDB- JobsDB.add_filter()
- JobsDB.create_job()
- JobsDB.create_jobs()
- JobsDB.get_born_effective_charges_from_job()
- JobsDB.get_dielectric_tensor_from_job()
- JobsDB.get_energy_from_job()
- JobsDB.get_forces_from_job()
- JobsDB.get_metadata_path()
- JobsDB.get_results_from_jobs()
- JobsDB.get_stress_from_job()
- JobsDB.remove_filter()
- JobsDB.reset_filters()
- JobsDB.save_metadata()
- JobsDB.save_table_info()
- JobsDB.set_table()
- JobsDB.structure
 
 
- principia_materia.io_interface.qpoints_io module
- principia_materia.io_interface.vasp module
- principia_materia.io_interface.yaml_dump module
Module contents
- principia_materia.io_interface.format_tensor(tensor, prec=8, cell_length=None, flat=False, yaml_style=False, indices=True, index_width=5)
- Format a tensor into string - Format float arrays from 1 or more dimensions into string, with several settings to control the format. - Parameters:
- tensor (array of floats) – The tensor to format. 
- prec (int, optional, default to 8) – The decimal points to round the floating point numbers to. 
- cell_length (int, optional, default to None) – The width to align numbers in. 
- flat (bool, optional, default to False) – If True, print out every single tensor entry along side its index. If True, flat - yaml_style, and- indicesare ignored. If False, if input tensor is a vector or matrix, print them out directly, if input tensor has rank greater than 2, loop over all the axes except the last 2, and print the last 2 axes out as a matrix.
- yaml_style (bool, optional, default to False) – If True, print out tensor in YAML nested list format. 
- indices (bool, optional, default to True) – If True, print out the indices of the matrix when rank of tensor is greater than 2. 
- index_width (int, optional, default to 5) – The width to align indices numbers in. 
 
 
- principia_materia.io_interface.get_compute_engine_map()
- Load First-Principle Interfaces. - Returns:
- compute_engine_map – A dictionary containing the available first-principle interfaces in the form of subclasses of ComputeJob. 
- Return type:
- dict 
 
- principia_materia.io_interface.indent(text, prefix=' ', initial_indent=None)
- Indent text - Create indentation for text, the function can also treat first line with special indentation. - Parameters:
- text (str) – Text to indent 
- prefix (str or int, optional, default to " ") – The indentation, if type is str, prepend the prefix to each line, if type is int, prepend the amount of spaces to each line. 
- initial_indent (str, optional, default to None) – If not None, prepend the input string to the first line of text. 
 
 
- principia_materia.io_interface.jobs_series_to_jobs_db(jobs_db, jobs_series, search_conditions=[], update=True)
- Read Jobs in from ComputeJobSeries and store them into database with JobsDB. - Parameters:
- jobs_db (JobsDB) – The interface of the database for storing the jobs. 
- jobs_series (ComputeJobSeries) – The interface to the job series for reading the jobs. 
- search_conditions (list, optional) – Additional search conditions for filtering the jobs. 
- update (bool, optional) – If True, only read and store the jobs that haven’t been read in before. If False, overwrite the data already in the database. 
 
 
- principia_materia.io_interface.tuple_to_str(tup, prec=8, strip=True)
- Format tuple into string. - Recursively format tuples into string. - Parameters:
- tup (tuple) – Input tuple. 
- prec (int, optional, default to 8) – The decimal points to round the floating point numbers to. 
- strip (bool, optional, default to True) – Whether to strip whitespaces from formatted numbers.