PAOFLOW.gen.qe_input.sources.aflow#

AFLOW database adapter.

Resolves an AFLOW reference (AFLOWDATA directory URL, material-page URL with ?id=aflow:<auid>, or a bare aflow:<auid> token), downloads the aflowlib.json reference card and the CONTCAR.relax.qe geometry, and normalizes them into a MaterialRecord.

Attributes#

Classes#

AflowSource

Adapter for the AFLOW (aflow.org / aflowlib) database.

Functions#

entry_file_url(base_url, filename)

Join an AFLOW entry base URL with a file name.

aurl_to_url(aurl)

Convert an AFLOW aurl ('host:AFLOWDATA/...') to an https file directory URL.

resolve_auid(auid)

Resolve an AFLOW AUID to its data-directory URL via the AFLUX API.

resolve_entry_url(url)

Normalize any accepted AFLOW reference into a data-directory URL.

parse_contcar_qe(text)

Extract the geometry cards from a CONTCAR.relax.qe file.

is_magnetic(spind)

True if any per-atom local moment exceeds the magnetic threshold.

resolve_species(aflow)

Return a list of (element, num_each_type) preserving AFLOW order.

Module Contents#

PAOFLOW.gen.qe_input.sources.aflow.AFLUX_API = 'https://aflow.org/API/aflux/'[source]#
PAOFLOW.gen.qe_input.sources.aflow.entry_file_url(base_url, filename)[source]#

Join an AFLOW entry base URL with a file name.

PAOFLOW.gen.qe_input.sources.aflow.aurl_to_url(aurl)[source]#

Convert an AFLOW aurl (‘host:AFLOWDATA/…’) to an https file directory URL.

PAOFLOW.gen.qe_input.sources.aflow.resolve_auid(auid)[source]#

Resolve an AFLOW AUID to its data-directory URL via the AFLUX API.

PAOFLOW.gen.qe_input.sources.aflow.resolve_entry_url(url)[source]#

Normalize any accepted AFLOW reference into a data-directory URL.

Accepts a direct AFLOWDATA directory URL, an aflow.org material page URL carrying ?id=aflow:<auid>, or a bare aflow:<auid> token.

PAOFLOW.gen.qe_input.sources.aflow.parse_contcar_qe(text)[source]#

Extract the geometry cards from a CONTCAR.relax.qe file.

Returns a dict with the verbatim ATOMIC_POSITIONS and CELL_PARAMETERS cards (header + data rows), their unit strings, and the ordered list of element symbols (one entry per atom).

PAOFLOW.gen.qe_input.sources.aflow.is_magnetic(spind)[source]#

True if any per-atom local moment exceeds the magnetic threshold.

PAOFLOW.gen.qe_input.sources.aflow.resolve_species(aflow)[source]#

Return a list of (element, num_each_type) preserving AFLOW order.

class PAOFLOW.gen.qe_input.sources.aflow.AflowSource[source]#

Bases: PAOFLOW.gen.qe_input.sources.base.DatabaseSource

Adapter for the AFLOW (aflow.org / aflowlib) database.

name = 'aflow'[source]#
matches(identifier)[source]#

Return True if identifier belongs to this database.

fetch(identifier, metallic=None, magnetic=None, kpoints=None, **options)[source]#

Download and normalize identifier into a MaterialRecord.