mdsuite.transformations.velocity_from_positions module

This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html

SPDX-License-Identifier: EPL-2.0

Copyright Contributors to the MDSuite Project.

Summary

Calculate the velocity of particles from their positions

class mdsuite.transformations.velocity_from_positions.VelocityFromPositions[source]

Bases: SingleSpeciesTrafo

Calculate the velocity based on the particle positions via simple forward derivative, i.e. v(t) = (x(t+dt)-x(t))/dt. The last velocity of the trajectory cannot be computed and is copied from the second to last.

transform_batch(batch: Dict[str, Tensor], carryover: Optional[Any] = None) Tensor[source]

Implement parent class abstract method.