Documentation ¶
Overview ¶
Package utils provides useful chemistry related utilities
Index ¶
- func IsCasNumber(c string) bool
- func IsCeNumber(c string) bool
- func LinearToEmpiricalFormula(f string) string
- func RandStringBytes(n int) string
- func SendMail(to string, subject string, body string) error
- func SortEmpiricalFormula(f string) (string, error)
- func SortSimpleFormula(f string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCasNumber ¶
IsCasNumber returns true if c is a valid cas number
func LinearToEmpiricalFormula ¶
LinearToEmpiricalFormula returns the empirical formula from the linear formula f. example: [(CH3)2SiH]2NH
(CH3)2C[C6H2(Br)2OH]2
func RandStringBytes ¶
RandStringBytes generates a n size random string
func SortEmpiricalFormula ¶
SortEmpiricalFormula returns the sorted f empirical formula.
func SortSimpleFormula ¶
SortSimpleFormula returns the sorted f formula.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.