Module

MolDraw.GeometryData

Package
purescript-mol-draw
Repository
lukasturcani/molDraw

Deals with the geometry which you want to draw.

#GeometryData Source

data GeometryData

Contains the atoms and bond segments which should be drawn.

#atoms Source

atoms :: GeometryData -> List GeometryAtom

Get the atoms which should be drawn.

#bondSegments Source

bondSegments :: GeometryData -> List BondSegment

Get the bond segments which should be drawn.

#fromV3000Content Source

fromV3000Content :: Content -> GeometryData

Create GeometryData from V3000 MDL file content.

#maybeParseV3000 Source

maybeParseV3000 :: String -> Either String GeometryData

Create GeometryData by trying to parse V3000 MDL file content.

#maybeMolecule Source

maybeMolecule :: Array Atom -> Array Bond -> Either String GeometryData

Create GeometryData from explicit atoms and bonds.

The reason this returns an Either, is that the provided bonds maybe be invalid. For example, if you have 3 atoms, but also a bond, which says its connected to an atom with id 50. This is clearly invalid input.