Constraints: incomplete list of fixed atoms triggers no warning or error message
Considering the following .vm script as minimal working example, with a water molecule as toy system:
H2O = Structure h2O from (
(atoms: ((symbols: 'O', 'H', 'H'),
(x: 6.0, 6.965039999999999, 5.8776) [angstrom],
(y: 6.0, 5.8776, 6.965039999999999) [angstrom],
(z: 6.0, 6.0, 6.0) [angstrom],
(masses: 15.999, 1.008, 1.008) [unified_atomic_mass_unit],
)),
(cell: [[12.0, 0.0, 0.0], [0.0, 12.0, 0.0], [0.0, 0.0, 12.0]] [angstrom]),
(pbc: [true, true, true]))
#Constraint definition:
H2O_plane = FixedPlane normal to [0, 0, 1] where (fixed: true, true)
calc = Calculator emt ((restart: default), (fixed_cutoff: default))
props = Property energy for H2O with calc with constraints (H2O_plane),
task: single point
print('Constraint:', H2O_plane, props.constrs)
print('Task:', props.task, props.energy)
This should trigger a warning, or error, because the number of fixed atoms in the definition of the H2O_plane constraint (two entries) does not match the number of atoms of the H2O system (3 atoms).
However, the script runs as if nothing, and the task is completed.
The correct constraint definition must include a true/false value for every atom in the atoms object.
In this example it should look like so:
H2O_plane = FixedPlane normal to [0, 0, 1] where (fixed: true, true, true)
There seems to be bug in the program inhibiting the consitency check between the number of total and constrained atoms.