Documentation
¶
Index ¶
- func DecodeOptions(stdin *bufio.Reader) (*Options, *Error)
- type Atom
- type Coords
- type Error
- func DecodeCoords(stream *bufio.Reader, atomnumber int) (*v3.Matrix, *Error)
- func DecodeMolecule(stream *bufio.Reader, atomnumber, frames int) (*chem.Topology, []*v3.Matrix, *Error)
- func EncodeAtoms(mol chem.Atomer, enc *json.Encoder) *Error
- func EncodeCoords(coords *v3.Matrix, enc *json.Encoder) *Error
- func NewError(where, function string, err error) *Error
- func SendMolecule(mol chem.Atomer, coordset, bfactors []*v3.Matrix, ss [][]string, out io.Writer) *Error
- type Info
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coords ¶
type Coords struct {
Coords []float64
}
A ready-to-serialize container for coordinates
type Error ¶
type Error struct { IsError bool //If this is false (no error) all the other fields will be at their zero-values. InOptions bool //If error, was it in parsing the options? InSelections bool //Was it in parsing selections? InProcess bool InPostProcess bool //was it in preparing the output? Selection string //Which selection? State int //Which state of it? Atom int Function string //which go function gave the error Message string //the error itself // contains filtered or unexported fields }
An easily JSON-serializable error type,
func DecodeCoords ¶
Decodecoords decodes streams from a bufio.Reader containing 3*atomnumber JSON floats into a v3.Matrix with atomnumber rows.
func DecodeMolecule ¶
func DecodeMolecule(stream *bufio.Reader, atomnumber, frames int) (*chem.Topology, []*v3.Matrix, *Error)
DecodeMolecule Decodes a JSON molecule into a gochem molecule. Can handle several frames (all of which need to have the same amount of atoms). It does not collect the b-factors.
func EncodeAtoms ¶
Encodes a goChem Atomer into a JSON
func EncodeCoords ¶
Encodes a set of coordinates into JSON
func SendMolecule ¶
func SendMolecule(mol chem.Atomer, coordset, bfactors []*v3.Matrix, ss [][]string, out io.Writer) *Error
Takes a chem.Atomer, coordinates, bfactos and secondary strucuctures, encodes them and writes them to the given io.writer
type Info ¶
type Info struct { Molecules int Bfactors bool SS bool FramesPerMolecule []int AtomsPerMolecule []int FloatInfo [][]float64 StringInfo [][]string IntInfo [][]int BoolInfo [][]bool Energies []float64 }
Information to be passed back to the calling program.
type Options ¶
type Options struct { SelNames []string AtomsPerSel []int //Knowing in advance makes memory allocation more efficient StatesPerSel []int //How many snapshots a traj has? StringOptions [][]string IntOptions [][]int BoolOptions [][]bool FloatOptions [][]float64 }
Options passed from the calling external program