Documentation ¶
Overview ¶
Package for interacting with the pubchem database to look up chemical properties
Index ¶
- func Compoundproperties(name string) (string, error)
- type Molecule
- func (molecule Molecule) GramPerL(molarity wunit.Concentration) (weightpervol wunit.Concentration)
- func (molecule Molecule) MolPerL(weightpervol wunit.Concentration) (molarity wunit.Concentration)
- func (molecule Molecule) MolarConcentration() (weightpervol wunit.Concentration)
- func (molecule Molecule) MolarMass() (weight wunit.Mass)
- func (molecule Molecule) ToString() string
- type Properties
- type Pubchemjson
- type Pubchemtable
- type Substance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compoundproperties ¶
Types ¶
type Molecule ¶
type Molecule struct { Name string MolecularFormula string `json:"MolecularFormula"` MolecularWeight float64 `json:"MolecularWeight"` CID int `json:"CID"` }
The principle type returned from querying the pubchem database if the molecule is not defined as a substance.
func MakeMolecule ¶
Lookup and make a molecule based on molecule name
func MakeMolecules ¶
Make an array of molecules based on molecule names If any errors are encountered they will be aggregated and returned at the end.
func (Molecule) GramPerL ¶
func (molecule Molecule) GramPerL(molarity wunit.Concentration) (weightpervol wunit.Concentration)
Converts a concentration in mol/L to a g/L concentration
func (Molecule) MolPerL ¶
func (molecule Molecule) MolPerL(weightpervol wunit.Concentration) (molarity wunit.Concentration)
Converts a concentration in g/L to a mol/L concentration
func (Molecule) MolarConcentration ¶
func (molecule Molecule) MolarConcentration() (weightpervol wunit.Concentration)
Returns the concentration in g/L required for 1 mol/L of the molecule
type Properties ¶
type Pubchemjson ¶
type Pubchemjson struct {
Propertytable []Properties `json:"Properties"`
}
type Pubchemtable ¶
type Pubchemtable struct {
Pubchemjson `json:"PropertyTable"`
}
Click to show internal directories.
Click to hide internal directories.