mol

package
v0.0.0-...-b74db82 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2016 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AtomicRadii = map[string]int{
	"H":  53,
	"He": 31,
	"Li": 167,
	"Be": 112,
	"B":  87,
	"C":  67,
	"N":  56,
	"O":  48,
	"F":  42,
	"Ne": 38,
	"Na": 190,
	"Mg": 145,
	"Al": 118,
	"Si": 111,
	"P":  98,
	"S":  88,
	"Cl": 79,
	"Ar": 71,
	"K":  243,
	"Ca": 194,
	"Sc": 184,
	"Ti": 176,
	"V":  171,
	"Cr": 166,
	"Mn": 161,
	"Fe": 156,
	"Co": 152,
	"Ni": 149,
	"Cu": 145,
	"Zn": 142,
	"Ga": 136,
	"Ge": 125,
	"As": 114,
	"Se": 103,
	"Br": 94,
	"Kr": 88,
	"Rb": 265,
	"Sr": 219,
	"Y":  212,
	"Zr": 206,
	"Nb": 198,
	"Mo": 190,
	"Tc": 183,
	"Ru": 178,
	"Rh": 173,
	"Pd": 169,
	"Ag": 165,
	"Cd": 161,
	"In": 156,
	"Sn": 145,
	"Sb": 133,
	"Te": 123,
	"I":  115,
	"Xe": 108,
	"Cs": 298,
	"Ba": 253,
	"Pr": 247,
	"Nd": 206,
	"Pm": 205,
	"Sm": 238,
	"Eu": 231,
	"Gd": 233,
	"Tb": 225,
	"Dy": 228,
	"Er": 226,
	"Tm": 222,
	"Yb": 222,
	"Lu": 217,
	"Hf": 208,
	"Ta": 200,
	"W":  193,
	"Re": 188,
	"Os": 185,
	"Ir": 180,
	"Pt": 177,
	"Au": 174,
	"Hg": 171,
	"Tl": 156,
	"Pb": 154,
	"Bi": 143,
	"Po": 135,
	"Rn": 120,
}

Functions

func Degrees

func Degrees(radians float64) float64

func Radians

func Radians(degrees float64) float64

Types

type Atom

type Atom struct {
	X, Y, Z float64
	Symbol  string
}

type Bond

type Bond struct {
	I, J int
	Type int
}

type Camera

type Camera struct {
	Eye    Vector
	Center Vector
	Up     Vector
	Fovy   float64
}

func MakeCamera

func MakeCamera(points []Vector) Camera

type Cylinder

type Cylinder struct {
	A, B   Vector
	Radius float64
	Type   int
}

type Molecule

type Molecule struct {
	Atoms []Atom
	Bonds []Bond
}

func ParseFile

func ParseFile(path string) (Molecule, error)

func ParseString

func ParseString(data string) Molecule

func (*Molecule) Camera

func (m *Molecule) Camera() Camera

func (*Molecule) Paths

func (m *Molecule) Paths(width, height float64) ln.Paths

func (*Molecule) Render

func (m *Molecule) Render(path string, width, height float64)

func (*Molecule) Solids

func (m *Molecule) Solids() ([]Sphere, []Cylinder)

type Sphere

type Sphere struct {
	Center Vector
	Radius float64
	Symbol string
}

type Vector

type Vector struct {
	X, Y, Z float64
}

func RandomUnitVector

func RandomUnitVector() Vector

func (Vector) Add

func (a Vector) Add(b Vector) Vector

func (Vector) Cross

func (a Vector) Cross(b Vector) Vector

func (Vector) DivScalar

func (a Vector) DivScalar(b float64) Vector

func (Vector) Dot

func (a Vector) Dot(b Vector) float64

func (Vector) Length

func (a Vector) Length() float64

func (Vector) MulScalar

func (a Vector) MulScalar(b float64) Vector

func (Vector) Normalize

func (a Vector) Normalize() Vector

func (Vector) Sub

func (a Vector) Sub(b Vector) Vector

Jump to

Keyboard shortcuts

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