Skip to content

Latest commit

 

History

History
50 lines (42 loc) · 3.6 KB

changes_v0.1.md

File metadata and controls

50 lines (42 loc) · 3.6 KB

Major changes from SPARC-X-API v0.1

SPARC-X-API has been heavily refactored in v1.0. If you're using legacy Python codes that are written under v0.1 API, there are a few major changes that require your attention:

  1. Support for single .ion file format is deprecated. Instead, v0.2 API treats the whole SPARC directory as a bundle format. Please use read_sparc and write_sparc methods for basic file I/O instead. Nevertheless, reading calculation results generated by a v0.1 API code will not be affected.

  2. v1.0 API uses a different mapping scheme for the sorting of ASE atoms objects (similar to Vasp), add a comment section in .ion file similar to follows:

# ASE-SORT:
# 3 2 1 0
# END ASE-SORT

which maps atoms 3, 2, 1, 0 from the SPARC .ion file order to atoms 0, 1, 2, 3 in ASE order. This is useful for systems that are constructed by ASE's add_adsorbate method.

  1. v1.0 API accepts all SPARC internal parameters (i.e. CAPITALIZED) in atomic units for consistency reason. However, we also keep a list of "special input params" that are conventionally used in other ASE calculators, that use Å / eV / GPa / fs unit system.

  2. Defining LATVEC, LATVEC_SCALE, or CELL via the calculator parameters is no longer encouraged. Instead, all structure changes should be made to the Atoms object.

For more discussion please see [Advanced Topic] section.

Below are a list of v0.1 method of the SPARC calculator and their current status in v0.2 API. calc is an instance of sparc.SPARC.

old methods status in v1.0 API alternatives
interpret_grid_input deprecated calc.set(fd_grid=[20, 20, 20])
interpret_kpoint_input deprecated calc.set(kpts=[3, 3, 3])
interpret_downsampling_input deprecated Manual setting not recommended
interpret_kpoint_shift deprecated calc.set(kpoint_shift=[0, 0, 0])
get_pseudopotential_directory deprecated calc.psp_dir
get_nstates maintained
setup_parallel_env deprecated Manual set
generate_command deprecated calc._make_command()
estimate_memory maintained
get_scf_steps maintained
get_geometric_steps deprecated calc.get_number_of_ionic_steps()
get_runtime maintained
get_fermi_level maintained
concatinate_output deprecated Use sparc.SparcBundle instead
read_line deprecated Use sparc.SparcBundle instead
parse_output deprecated calc.read_results()
parse_relax deprecated calc.read_results()
parse_md deprecated calc.read_results()
parse_input_args deprecated calc.set(**kwargs)
recover_index_order_from_ion_file deprecated Use calc.sort and calc.resort
atoms_dict deprecated Use third party library like bson
dict_atoms deprecated Use third party library like bson