Added function for fast prediction via nep batching

Evaluating properties for many structures one at a time with CPUNEP/GPUNEP is slow. GPUMD's standalone nep executable can evaluate an entire train.xyz in a single GPU pass via its prediction mode, which is much faster for large batches.

This adds batch_predict_properties(structures, model, command=None) to calorine.tools, which wraps that workflow: it takes a list of Atoms and a NEP model (either a path to nep.txt or a Model object), runs nep in prediction mode once, and returns new Atoms objects with a SinglePointCalculator attached exposing the standard properties (energy, forces, stress, and, depending on model type, charges/ born_effective_charges for qNEP or dipole/polarizability for TNEP models).

Also adds a CALORINE_NEP_COMMAND environment variable (mirroring CALORINE_GPUMD_COMMAND) to configure the nep executable used.

Verified against CPUNEP for potential, qNEP (charge_mode 1 and 2), dipole, and polarizability models, including edge cases (empty input, cell-less structures, mixed-size batches, passing a Model object directly).

Merge request reports

Loading