Resolve "System links and ASE atoms for results section"
Compare changes
Files
3
examples/api/to_ase.py
0 → 100644
+ 49
− 0
Beginning with 2nd June, only the "Single Sign On" option for login to the GitLab web interface will be possible. If you don't have an MPCDF wide second factor so far, please get one at our SelfService (https://selfservice.mpcdf.mpg.de). The GitLab internal second factor will not work.
The new to_ase
function allows to conviniently generate an ASE Atoms object from a given section syst em based on the data in its atoms
sub-section. Here is a simple example:
from nomad.client import ArchiveQuery
query = ArchiveQuery(
required={
'run': {
'system[-1]': {
'atoms': '*'
}
}
})
result = query.download(1)[0]
atoms = result.run[0].system[-1].atoms.to_ase()
print(atoms.get_chemical_formula(mode='reduce'))
See also the discussion here: https://matsci.org/t/convert-query-result-directly-to-ase-atoms-objects/44513/7