Traceback (most recent call last):
File "vre-language/src/virtmat/language/utilities/errors.py", line 302, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/cli/run_model.py", line 113, in evaluate_prog
print(f'program output: >>>\n{prog.value}\n<<<')
File "/usr/lib/python3.10/functools.py", line 981, in __get__
val = self.func(instance)
File "vre-language/src/virtmat/language/utilities/errors.py", line 211, in wrapper
raise TextXError(str(err), **get_location_context(obj)) from err
textx.exceptions.TextXError: vre-language/examples/argon_singlepoint.vm:1:1: 'PintSeriesAccessor' object has no attribute '_index' => 'epsilon_K = 119
.8 [K]
kB = 1. [boltzmann_constant]
sigma = 3.405 [angstrom]
h = sigma * 2**(1/2) / 2
x = map((x: x*h), (x: 0., 1., 1., 0.))
y = map((y: y*h), (y: 0., 1., 0., 1.))
z = map((z: z*h), (z: 0., 0., 1., 1.))
symbols = (symbols: 'Ar', 'Ar', 'Ar', 'Ar')
calc = Calculator lj ((sigma: sigma) , (epsilon: epsilon_K*kB))
struct = Structure fcc_Ar4 (
(atoms: Table (symbols, x, y, z)),
(pbc: [true, true, true]),
(cell: [[4.82, 0., 0.], [0., 4.82, 0.], [0., 0., 4.82]] [angstrom])
)
prop = Property energy, forces ((calculator: calc), (structure: struct))
print(calc, struct)
print(prop)
print(prop.energy[0])
print(prop.forces)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "python-3.10.12/bin/texts", line 8, in <module>
sys.exit(texts())
File "vre-language/src/virtmat/language/cli/__init__.py", line 25, in texts
clargs.func(clargs)
File "vre-language/src/virtmat/language/cli/run_model.py", line 156, in main
evaluate_prog(prog)
File "vre-language/src/virtmat/language/utilities/errors.py", line 304, in wrapper
process_error(err)
File "vre-language/src/virtmat/language/utilities/errors.py", line 292, in process_error
raise err.__cause__
File "vre-language/src/virtmat/language/utilities/errors.py", line 207, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/utilities/types.py", line 211, in wrapper
return checktype_(func(obj), obj.type_)
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 50, in program_value
vals = [p.value for p in get_children_of_type('Print', self) if p.value]
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 50, in <listcomp>
vals = [p.value for p in get_children_of_type('Print', self) if p.value]
File "vre-language/src/virtmat/language/utilities/errors.py", line 304, in wrapper
process_error(err)
File "vre-language/src/virtmat/language/utilities/errors.py", line 292, in process_error
raise err.__cause__
File "vre-language/src/virtmat/language/utilities/errors.py", line 207, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/utilities/types.py", line 211, in wrapper
return checktype_(func(obj), obj.type_)
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 560, in amml_property_value
return amml.Property(self.names, self.struct.value,
File "vre-language/src/virtmat/language/utilities/amml.py", line 828, in __init__
self.dof_vector, self.dof_number = self.get_dof()
File "vre-language/src/virtmat/language/utilities/amml.py", line 872, in get_dof
atoms = self.structure[0:1].to_ase()[0]
File "vre-language/src/virtmat/language/utilities/amml.py", line 596, in to_ase
dfr_ase = self.get_ase_atoms_dataframe()
File "vre-language/src/virtmat/language/utilities/amml.py", line 627, in get_ase_atoms_dataframe
dfr_ase['positions'] = dfr['atoms'].apply(xyz2pos)
File "python-3.10.12/lib/python3.10/site-packages/pandas/core/series.py", line 4924, in apply
).apply()
File "python-3.10.12/lib/python3.10/site-packages/pandas/core/apply.py", line 1427, in apply
return self.apply_standard()
File "python-3.10.12/lib/python3.10/site-packages/pandas/core/apply.py", line 1507, in apply_standard
mapped = obj._map_values(
File "python-3.10.12/lib/python3.10/site-packages/pandas/core/base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "python-3.10.12/lib/python3.10/site-packages/pandas/core/algorithms.py", line 1743, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
File "vre-language/src/virtmat/language/utilities/amml.py", line 613, in xyz2pos
xcoord = atoms['x'].pint.to('angstrom').values.data
File "python-3.10.12/lib/python3.10/site-packages/pint_pandas/pint_array.py", line 1221, in __get__
index = object.__getattribute__(obj, "_index")
AttributeError: 'PintSeriesAccessor' object has no attribute '_index'