References to properties and queries of AMML objects
The individual series of AMMLStructure
, AMMLCalculator
, AMMLProperty
can be accessed using reference rules matching their names, i.e.
struct = Structure from ((atoms: (...)), (cell: (...)), (pbc: true))
calc = Calculator from ((name: ...), (parameters: ((p1: ...), (p2: ...), ...))))
e = Property from ((name: 'total energy'), (structure: struct), (calculator: calc))
f = Property from ((name: 'forces'), (structure: struct), (calculator: calc))
print(e.name) # result: (name: 'total energy')
print(e.calculator.name) # result: (name: ...)
print(calc.parameters) # result: (parameters: ((p1: ...), (p2: ...), ...))))
print(f.structure) # result: (structure: ...) or graphical object
print(struct.pbc) # result: (pbc: true)
This rule is already used to access a Series
from a Table
.
Edited by Ivan Kondov