dcd

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrajUnIni           = "Traj object uninitialized to read"
	ReadError           = "Error reading frame"
	UnableToOpen        = "Unable to open file"
	SecurityCheckFailed = "FailedSecurityCheck"
	WrongFormat         = "Wrong format in the DCD file or frame"
	NotEnoughSpace      = "Not enough space in passed blocks"
	EOF                 = "EOF"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DCDObj

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

Container for an Charmm/NAMD binary trajectory file.

func New

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

New builds a new DCDObj object from a DCD trajectory file

func (*DCDObj) Len

func (D *DCDObj) Len() int

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

func (*DCDObj) Next

func (D *DCDObj) Next(keep *v3.Matrix) error

Next Reads the next frame in a DcDObj 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 (*DCDObj) NextConc

func (D *DCDObj) 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 (*DCDObj) Readable

func (D *DCDObj) 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.

type DCDWObj added in v0.6.0

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

Container for an Charmm/NAMD binary trajectory file. opened for writing

func NewWriter added in v0.6.0

func NewWriter(filename string, natoms int) (*DCDWObj, error)

New writer initializes a DCD trajectory for writing.

func (*DCDWObj) WNext added in v0.6.0

func (D *DCDWObj) WNext(towrite *v3.Matrix) error

WNext rites the next frame to the trajectory.

type Error

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

Error is the general structure for DCD trajectory errors. It fullfills chem.Error and chem.TrajError

func (Error) Critical

func (err Error) Critical() bool

Critical returns true if the error is critical, false otherwise

func (Error) Decorate

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

Decorate Adds new information to the error

func (Error) Error

func (err Error) Error() string

func (Error) FileName

func (err Error) FileName() string

Filename returns the file to which the failing trajectory was associated

func (Error) Format

func (err Error) Format() string

Format returns the format of the file (always "dcd") associated to the error

type WB added in v0.6.0

type WB []byte

A writing buffer for DCD format

func (WB) Write added in v0.6.0

func (B WB) Write(w []byte) (int, error)

Writes w to the buffer

Jump to

Keyboard shortcuts

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