Molecule.createAtom

Arguments

let molecule = new Molecule();

molecule.createAtom(elementSymbol /* type: String */);

Returns

Type: Atom Instance

The function returns the generated Atom instance linked to the molecule.

Interactive Example

const { Molecule } = require('mcul'); let molecule = new Molecule(); let hydrogen = molecule.createAtom('H'); console.log(hydrogen);