Skip to content

`output_structure` should be Structure and not Series

To reuse a structure we usually take the output_structure from a property, e.g.

prop_opt = Property energy ((calculator: calc_opt), (structure: struct_in))
struct_opt = prop_opt.output_structure
prop = Property energy, forces ((calculator: calc),  (structure: struct_opt))

This causes an error:

Type error: None:: --> struct_opt <--
Parameter "struct_opt" must be an AMML structure

This is because the type of output_structure is Series (as any property name). In fact, if we take struct_opt = prop_opt.output_structure[0] there will be no error. But this is not intuitive. AMML parameters such as structure, calculator that are iterable types anyway, should be no Series. If output_structure is AMML Structure and we want to process only the first element then we can use the same syntax struct_opt = prop_opt.output_structure[0] as for Series.

Edited by Ivan Kondov