Skip to contents

Returns dt when any water's H-H vector rotates by at least 90 degrees between the two frames, and NaN otherwise. Both frames must contain oxygen and hydrogen. In exampleTraj.lammpstrj those species are types 2 and 1. ice1h.lammpstrj is oxygen only, so it has no H-H vector. Comparing a frame with itself returns NaN.

Usage

jump_tau90(first, second, dt = 1, oxygen_type = 1L, hydrogen_type = 2L)

Arguments

first, second

dseams_frame objects read with every atom (type = -1), so that both oxygens and hydrogens are present.

dt

Time between the two frames.

oxygen_type, hydrogen_type

LAMMPS types of the oxygen and hydrogen atoms.

Value

A number: dt, or NaN.

Examples

frame <- read_frame(dseams_example("exampleTraj.lammpstrj"), type = -1L)
jump_tau90(frame, frame, dt = 1, oxygen_type = 2L, hydrogen_type = 1L)
#> [1] NaN