dcd

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 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)

func (*DCDObj) Len

func (D *DCDObj) Len() int

Natoms 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

Returns true if the object is ready to be read from false otherwise. It doesnt guarantee that there is something to read. true or false depending on whether D is ready to read snapshots from it.

type DCDWObj added in v0.6.0

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

Container for an Charmm/NAMD binary trajectory file.

func NewWriter added in v0.6.0

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

Initializes a trajectory for writing. You need to provide _some_ estimate of the frames to be write here.

func (*DCDWObj) WNext added in v0.6.0

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

Writes 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

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 WB added in v0.6.0

type WB []byte

A writing buffer

func (WB) Write added in v0.6.0

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

Jump to

Keyboard shortcuts

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