Documentation ¶
Overview ¶
Package util contains some methods that can be used by every other package.
Index ¶
- func Header(r *bufio.Reader, w io.Writer, ...) (atoms int, box [3]float64, err error)
- func HeaderBox(r *bufio.Reader, w io.Writer, ...) (box [3]float64, err error)
- func HeaderWOutAtoms(r *bufio.Reader, w io.Writer, ...) (box [3]float64, err error)
- func Pow(x float64, n int) float64
- func ReadCfgNonCvg(r *bufio.Reader, x int) error
- func Write(path string, structure interface{}) (*os.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Header ¶
func Header(r *bufio.Reader, w io.Writer, readSlice func(r *bufio.Reader, w io.Writer) []byte) (atoms int, box [3]float64, err error)
Header corresponds to the lines specific to a Lammps trajectory file. It contains the size of the box and the number of atoms. This method returns the number of atoms, the size of the box, the size of the box divided by two.
func HeaderBox ¶
func HeaderBox(r *bufio.Reader, w io.Writer, readSlice func(r *bufio.Reader, w io.Writer) []byte) (box [3]float64, err error)
HeaderBox returns the box size.
func HeaderWOutAtoms ¶
func HeaderWOutAtoms(r *bufio.Reader, w io.Writer, readSlice func(r *bufio.Reader, w io.Writer) []byte) (box [3]float64, err error)
HeaderWOutAtoms returns the size of the box, the size of the box divided by two. It is like HeaderBox but without the number of atoms.
func ReadCfgNonCvg ¶
ReadCfgNonCvg reads x non converged configurations. These non configurations will be automatically "discarded" and won't be taken into account. It is a very fast method.
Types ¶
This section is empty.