atomref scalar-data quickstart¶
Goal. Retrieve common atomic reference values, inspect the provenance of a transferred value, and discover the packaged scalar datasets.
Prerequisites. Install atomref; no optional dependencies or prior
knowledge of its registry and policy internals are required.
A separate notebook covers the density and pairwise neutral-proatom workflows.
Setup and element discovery¶
Import the public package namespace, normalize one element symbol, and list the available reference-data quantities.
import atomref as ar
print(ar.get_element('Cl'))
print(ar.list_quantities())
Element(z=17, symbol='Cl', name='Chlorine')
('covalent_radius', 'van_der_waals_radius', 'atomic_radius', 'xh_bond_length', 'proatomic_density')
Direct scalar lookups¶
The convenience get_* functions return numbers in angstrom. They are the
short path when the selected value is all the caller needs.
r_c = ar.get_covalent_radius('C')
r_vdw = ar.get_vdw_radius('O')
print(r_c)
print(r_vdw)
assert r_c == 0.76
assert r_vdw == 1.50
0.76 1.5
A lookup with provenance¶
The preferred van der Waals table has no direct value for Pm. lookup_*
returns the value together with the transfer method and source dataset.
lookup = ar.lookup_vdw_radius('Pm')
print(f"{lookup.value:.12f}")
print(lookup.source)
print(lookup.resolved_from)
assert lookup.source == 'transfer_linear'
2.897226539515 transfer_linear (DatasetRef(quantity='atomic_radius', set_id='rahm2016'),)
Catalog metadata¶
Quantity and dataset metadata make units, intended role, and source choice discoverable instead of leaving them as project-local conventions.
quantity = ar.get_quantity_info('atomic_radius')
print(quantity.quantity, quantity.domain, quantity.units)
for info in ar.list_dataset_infos('van_der_waals_radius', usage_role='target'):
print(info.ref.set_id, info.name, info.usage_role)
atomic_radius element angstrom bondi1964 Bondi van der Waals radii target rowland_taylor1996 Rowland & Taylor nonbonded contact radii target alvarez2013 Alvarez van der Waals radii target chernyshov2020 Chernyshov LoS van der Waals radii target
Direct packaged-set access¶
Load a target radii table through its convenience helper and a support table through the generic dataset reference used by the registry.
vdw = ar.get_radii_set('van_der_waals', 'alvarez2013')
print(vdw.get('O'))
support = ar.get_builtin_set(ar.DatasetRef('atomic_radius', 'rahm2016'))
print(support.get('Pm'))
1.5 2.83
What this demonstrated and limitations¶
The scalar API supports short numeric lookups, provenance-carrying results, catalog discovery, and direct packaged-set access. A transferred value is a declared policy result, not a hidden measurement. Dataset suitability and fallback policy remain choices for the consuming scientific workflow.