Modules.default.SmartAtoms.vmodu

 import Modules.default.SmartAtomDimensions import Modules.default.PeriodicTable module SmartAtoms: →→ new PublicFunction setOrbital(Electron e, String o): →→→→ new Array e.OrbitalRange.x = getVar("SmartAtomDimensions." + o + ".x" ); →→→→ new Array e.OrbitalRange.y = getVar("SmartAtomDimensions." + o + ".y" ); →→→→ new <font color="#808">Array e.OrbitalRange.z = getVar(<font color="#800">"SmartAtomDimensions." + o + <font color="#800">".z" ); <font color=#ccc>→→ new <font color="#808">Function orbit(<font color="#808">Electron e): <font color=#ccc>→→→→ new <font color="#808">Int posI = randomInt(<font color="#00a">0, e.OrbitalRange.length - <font color="#00a">1 ); <font color=#ccc>→→→→ new <font color="#808">Array x = e.OrbitalRange.x; <font color=#ccc>→→→→ new <font color="#808">Array y = e.OrbitalRange.y; <font color=#ccc>→→→→ new <font color="#808">Array z = e.OrbitalRange.z; <font color=#ccc>→→→→ e.setPos(x[posI], y[posI], z[posI]); <font color=#ccc>→→ new <font color="#808">Class Hadron(<font color="#808">Quark q1, <font color="#808">Quark q2, <font color="#808">Quark q3) in Particle: <font color=#ccc>→→→→ new <font color="#808">Property charge(Type = <font color="#808">Double ); <font color=#ccc>→→→→ new <font color="#808">Property pos(Type = <font color="#808">Vec3 ); <font color=#ccc>→→→→ self = object.applyGluons(q1,q2,q3); <font color=#ccc>→→→→ charge = q1.charge + q2.charge + q3.charge; <font color=#ccc>→→ new <font color="#808">Class Proton in Hadron: <font color=#ccc>→→→→ Hadron.q1.type=up; <font color=#ccc>→→→→ Hadron.q2.type=up; <font color=#ccc>→→→→ Hadron.q3.type=down; <font color=#ccc>→→ new <font color="#808">Class Neuton in Hadron: <font color=#ccc>→→→→ Hadron.q1.type=up; <font color=#ccc>→→→→ Hadron.q2.type=down; <font color=#ccc>→→→→ Hadron.q3.type=down; <font color=#ccc>→→ new <font color="#808">Class Atom(<font color="#808">String atomicName, <font color="#808">Int atomicNumber, <font color="#808">Int isotope): <font color=#ccc>→→→→ new <font color="#808">Property Nucleus(Type = <font color="#808">ParticleArray ); <font color=#ccc>→→→→ new <font color="#808">Property charge(Type = <font color="#808">Int ); <font color=#ccc>→→→→ new <font color="#808">Property pos(Type = <font color="#808">Vec3 ); <font color=#ccc>→→→→ if (atomicNumber = <font color="#00a">null ): <font color=#ccc>→→→→→→ atomicNumber =        PeriodicTable.All[<font color="#00a">1 ][indexOf(atomicNumber,PeriodicTable.All[<font color="#00a">0 ])]; <font color=#ccc>→→→→ Nucleus.addMultiple(new Proton, atomicNumber); <font color=#ccc>→→→→ Nucleus.addMultiple(new Proton, isotope - atomicNumber); <font color=#ccc>→→→→ Nucleus.relPos = pos; <font color=#ccc>→→→→ Nucleus.addMultiple(new <font color=#808>Electron ei, atomicNumber); <font color=#ccc>→→→→ repeat <font color=#00a>infinity : <font color=#ccc>→→→→ orbit(ei);