Go MOL2 simple parser
Simple Go package for parsing Tripos Mol2 File Format.
Feature parsing:
- Atom
- atom_id
- atom_name
- x, y, z
- atom_type
- substructure
- subst_name
- charge
- status_bit TODO
- Bond
- bond_id
- origin_atom_id
- target_atom_id
- bond_type
- status_bits TODO
- Molecule
- mol_name
- num_atoms
- num_bonds
- num_subst TODO
- num_feat TODO
- num_sets TODO
- mol_type
- charge_type
- status_bits
- mol_comment TODO
Install: go get github.com/ldinc/gomol2/mol2
Example:
Parsing from file:
mol, err := mol2.ParseFile(filename)
fmt.Println(mol)
Parsing from byte-slice
var buffer []byte
...
mol, err := mol2.ParseText(buffer)
fmt.Println(mol)