ASE converter: access velocities and charges
Description of work Until now ASE converter has ignored velocity values, even if they were present in the input trajectory. The converter has been extended to check for momenta of atoms being stored in the trajectory. The velocities are then calculated from the momenta using the information about the atom masses.
Fixes
- A check for 'momenta' being present in arrays has been added.
- Masses stored in the trajectory are used for the calculation of velocities from momenta.
- Standard atom masses are used if trajectory does not define its own masses.
- The ASE converter now also checks for partial charges in the frame arrays.
To test Convert an ASE trajectory (e.g. the Cu example from MDANSE-Examples). Calculate the velocity autocorrelation function twice, once using the velocities from trajectory, and once by interpolating. The results should be different, but close. Convert a trajectory containing charge information. Set up an infrared spectrum calculation. The partial charge setter dialog should show that charges are defined in the trajectory.