let molecule = new Molecule();
molecule.createAtoms(elementSymbol /* type: String */, count /* type: Number */);
elementSymbol - The symbol corresponding to the element of the atomcount - The number of atoms to generateType: Array[Atom Instance]
The function returns an array of generated Atom instances linked to the molecule.
const { Molecule } = require('mcul'); let molecule = new Molecule(); let hydrogen = molecule.createAtoms('H', 3); console.log(hydrogen);