Skip to main content

Interface: MoleculeOptions

Defined in: src/mobjects/chemistry/chemistryTypes.ts:47

Options for a MoleculeMobject.

Properties​

atoms​

atoms: AtomSpec[]

Defined in: src/mobjects/chemistry/chemistryTypes.ts:49

The atoms of the molecule.


bondColor?​

optional bondColor: string

Defined in: src/mobjects/chemistry/chemistryTypes.ts:61

Color of the bond lines. Default: white.


bondLength?​

optional bondLength: number

Defined in: src/mobjects/chemistry/chemistryTypes.ts:53

Scale applied to every atom coordinate. Default: 1.


bonds?​

optional bonds: BondSpec[]

Defined in: src/mobjects/chemistry/chemistryTypes.ts:51

The bonds between atoms. Default: [].


bondSpacing?​

optional bondSpacing: number

Defined in: src/mobjects/chemistry/chemistryTypes.ts:63

Distance between the parallel lines of a double or triple bond. Default: 0.08.


colors?​

optional colors: Record<string, string>

Defined in: src/mobjects/chemistry/chemistryTypes.ts:55

Per-element color overrides, e.g. { C: '#000000' }. Merged over the CPK palette.


labelFontSize?​

optional labelFontSize: number

Defined in: src/mobjects/chemistry/chemistryTypes.ts:59

Font size for atom labels. Default: 28.


showCarbonLabels?​

optional showCarbonLabels: boolean

Defined in: src/mobjects/chemistry/chemistryTypes.ts:57

Whether to draw a label on carbon atoms. Default: false (skeletal convention).