velocity

py4vasp.calculation.velocity
class py4vasp.calculation._velocity.Velocity(*args, **kwargs)

The velocities describe the ionic motion during an MD simulation.

The velocities of the ions are a metric for the temperature of the system. Most of the time, it is not necessary to consider them explicitly. VASP will set the velocities automatically according to the temperature settings (TEBEG and TEEND) unless you set them explicitly in the POSCAR file. Since the velocities are not something you typically need, VASP will only store them during the simulation if you set VELOCITY = T in the INCAR file. In that case you can read the velocities of each step along the trajectory. If you are only interested in the final velocities, please consider the CONTCAR class.

Examples

If you access a method of this class, the result will depend on the steps that you selected with the [] operator. Without any selection the results from the final step will be used.

>>> calc.velocity.read()

To select the results for all steps, you don’t specify the array boundaries.

>>> calc.velocity[:].read()

You can also select specific steps or a subset of steps as follows

>>> calc.velocity[5].read()
>>> calc.velocity[1:6].read()
plot()

Plot the velocities as vectors in the structure.

This is currently only implemented for a single step. So selecting multiple steps will raise an error.

Returns:

Contains all atoms and the velocities are drawn as vectors.

Return type:

Viewer3d

Examples

If you access this method, the result will depend on the steps of the class that you selected with the [] operator. Without any selection the results from the final step will be used.

>>> calc.velocity.plot()

To select the results for all steps, you don’t specify the array boundaries.

>>> calc.velocity[:].plot()

You can also select specific steps or a subset of steps as follows

>>> calc.velocity[5].plot()
>>> calc.velocity[1:6].plot()
print()

Print a string representation of this instance.

read(*args, **kwargs)

Convenient wrapper around to_dict. Check that function for examples and optional arguments.

selections()

Returns possible alternatives for this particular quantity VASP can produce.

The returned dictionary contains a single item with the name of the quantity mapping to all possible selections. Each of these selection may be passed to other functions of this quantity to select which output of VASP is used.

Returns:

The key indicates this quantity and the values possible choices for arguments to other functions of this quantity.

Return type:

dict

to_dict()

Return the structure and ion velocities in a dictionary

Returns:

The dictionary contains the ion velocities as well as the structural information for reference.

Return type:

dict

Examples

If you access this method, the result will depend on the steps of the class that you selected with the [] operator. Without any selection the results from the final step will be used.

>>> calc.velocity.to_dict()

To select the results for all steps, you don’t specify the array boundaries.

>>> calc.velocity[:].to_dict()

You can also select specific steps or a subset of steps as follows

>>> calc.velocity[5].to_dict()
>>> calc.velocity[1:6].to_dict()