Skip to contents

type = 0 guesses oxygen (LAMMPS type 2, otherwise type 1). A positive type keeps that species. A negative type keeps every atom.

Usage

read_frame(path, frame = 1L, type = 0L)

nframes(path)

# S3 method for class 'dseams_frame'
print(x, ...)

# S3 method for class 'dseams_frame'
summary(object, ...)

Arguments

path

Path to a LAMMPS dump, or an XYZ file.

frame

1-based frame index.

type

LAMMPS type filter.

x

A dseams_frame, for print().

...

Ignored.

object

A dseams_frame, for summary().

Value

read_frame() returns an object of class dseams_frame. nframes() returns the number of LAMMPS timesteps; an XYZ file counts as one. print() and summary() return the frame, invisibly.

Details

print() reports the frame index and the atom count. summary() also reports the file and the type filter. Both return the frame, invisibly.

Examples

path <- dseams_example("ice1h.lammpstrj")
nframes(path)
#> [1] 1
frame <- read_frame(path, type = -1L)
frame
#> dseams frame 1 atoms 128