xtc

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2021 License: LGPL-2.1 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrajUnIni    = "Traj object uninitialized to read"
	ReadError    = "Error reading frame"
	UnableToOpen = "Unable to open file"
	EOF          = "EOF"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is an error with xtb trajectories, compatible with goChem

func (Error) Critical

func (err Error) Critical() bool

func (Error) Decorate

func (E Error) Decorate(deco string) []string

func (Error) Error

func (err Error) Error() string

func (Error) FileName

func (err Error) FileName() string

func (Error) Format

func (err Error) Format() string

type XTCObj

type XTCObj struct {
	// contains filtered or unexported fields
}

XTCObj is a container for an GROMACS XTC binary trajectory file.

func New

func New(filename string) (*XTCObj, error)

New returns an xtb object from a xtb-formated trajectory file

func (*XTCObj) Len

func (X *XTCObj) Len() int

Len returns the number of atoms per frame in the XTCObj. XTCObj must be initialized. 0 means an uninitialized object.

func (*XTCObj) Next

func (X *XTCObj) Next(output *v3.Matrix) error

Next Reads the next frame in a XTCObj that has been initialized for read With initread. If keep is true, returns a pointer to matrix.DenseMatrix With the coordinates read, otherwiser, it discards the coordinates and returns nil.

func (*XTCObj) NextConc

func (X *XTCObj) NextConc(frames []*v3.Matrix) ([]chan *v3.Matrix, error)

NextConc takes a slice of bools and reads as many frames as elements the list has form the trajectory. The frames are discarted if the corresponding elemetn of the slice is false. The function returns a slice of channels through each of each of which a *matrix.DenseMatrix will be transmited

func (*XTCObj) Readable

func (X *XTCObj) Readable() bool

Readable returns true if the object is ready to be read from false otherwise. IT doesnt guarantee that there is something to read.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL