ApasScript.

Chemistry

These are Apas Cloud services: they run on our servers for a signed-in member. The examples below are shown already made; sign in to edit and run your own.

Visual models

molecule Apas Cloud

Draws a molecular structure from SMILES using validated atom and bond connectivity; skeletal carbon labels are omitted by convention. Rings are drawn as textbooks draw them (fused, spiro and bridged systems flat; bicyclo[2.2.2] with its bridge inside), chains in a zigzag with sp atoms straight. A double bond written with the SMILES marks is drawn cis or trans as written: `C/C=C\\C` is cis (a doubled backslash is read as one), `C/C=C/C` is trans.

moleculeSmiles Apas Cloud

Explicit name for molecule(): parses SMILES into a validated chemical graph and lays it out as a diagram.

moleculeMolfile Apas Cloud

Parses MDL Molfile V2000 connectivity and draws the validated molecular graph. Coordinates in the file are currently relaid out consistently by gtgraphics.

lewisDiagram Apas Cloud

Draws a Lewis structure from a supported molecular formula, with bonds, formal charges and colored lone-pair electron dots. A lone carbon with hydrogen about is the centre (HCN, H2CO).

vsepr Apas Cloud

Draws a school-level VSEPR molecule shape with central-atom lone pairs from a supported formula, such as H2O or NH3. Shapes in 3D are drawn as in the textbook: bonds in the page as lines, a bond towards you as a solid wedge, one away from you as a hashed wedge (CH4, NH3, PCl5, SF6). Formula alone cannot identify every molecular structure.

vseprPanel Apas Cloud

Shows two to four labeled VSEPR structures together in one compact comparison panel. The panel widens to the molecules drawn, so three large ones (BF3, PCl5, SF6) keep their lone pairs apart.

molecule3d Apas Cloud

Draws a molecule with one central atom as a 3D ball-and-stick model: shaded balls, bonds, lone pairs as clouds with two dots, and an arc for each different bond angle. The directions are the VSEPR shape's; NH3 and H2O close to their measured 107° and 104.5°. Change yaw from frame to frame to turn it.

molecule3dMorph Apas Cloud

One shape turning into another with the same number of electron pairs, as a 3D ball-and-stick model: each bond or lone pair moves along a great circle to its new place, and a bond that becomes a lone pair fades out as the pair fades in. The angle arcs follow the angle as it changes.

ionicLattice Apas Cloud

Draws a colored checkerboard plane section of an alternating ionic crystal; this shows a lattice slice, not an isolated ion pair.

resonancePanel Apas Cloud

Shows two explicit Lewis contributors side by side with a resonance arrow; the structures are supplied as SMILES.

hydrogenBondDiagram Apas Cloud

Draws a labeled O-H···O intermolecular hydrogen bond, distinguishing the dashed attraction from the solid covalent bond.

molecularOrbitals Apas Cloud

Draws qualitative molecular orbital energy levels and electron filling for supported homonuclear second-period diatomics from Be2 through Ne2, including ions. H2, H2+, H2-, He2 and He2+ have their two 1s levels.

Classroom diagrams

reactionScheme Apas Cloud

A reaction scheme: structures either side of an arrow, the conditions over it. Two reactants or products are written in one string joined by " + "; a second condition after ";" goes under the arrow.

conformation Apas Cloud

Draws a Newman or sawhorse projection. Two arguments: staggered or eclipsed ethane. Three: the molecule (ethane, propane, butane, 1,2-dichloroethane, 1,2-dibromoethane, ethane-1,2-diol) and the dihedral angle in degrees or by name (anti, gauche, eclipsed, fully eclipsed, staggered).

apparatus Apas Cloud

Draws parameterized native laboratory apparatus with optional contents and fill percentage. A gas jar shows particles rather than liquid; a separatory funnel label containing / shows two immiscible layers, with the first named layer on top.

particleContainer Apas Cloud

Fills a native container with a deterministic solid, liquid, or gas particle model.

electrochemicalCell Apas Cloud

Draws two half-cells, electrodes, external electron flow, and a salt bridge from four labels.

reactionEnergyDiagram Apas Cloud

Draws a one-step exothermic or endothermic profile, a two-step profile, or an enzyme profile comparing paths with the same endpoints and different activation barriers. Exothermic and endothermic profiles name the reactants, products, transition state, Eₐ and ΔH; a two-step profile marks its two barriers.

electronMovement Apas Cloud

Places a curved electron-movement arrow over a validated SMILES structure. One-based atom:N or bond:N selectors attach its ends to atoms or bond midpoints; source-only lonePair:N checks for an available main-group lone pair and draws two dots. An optional pair or single mode draws a full or fish-hook arrow. This is a teaching annotation; it does not validate a reaction mechanism.

conformationEnergyDiagram Apas Cloud

The torsional energy curve against the dihedral angle with its scale: ethane (12.5 kJ/mol between staggered and eclipsed) by default; "butane" for anti, gauche, eclipsed and fully eclipsed (0, 3.8, 16, 19 kJ/mol).

Visual models

atomBuilder Apas Cloud

Builds a neutral isotope from atomic number Z and mass number A. By default shows Bohr shells with filled electron dots and compact P/N counts in the nucleus; isotope and shell counts appear below the picture. Choose orbital or compact for quantum orbital boxes.

bohrModel Apas Cloud

Draws a school-level Bohr shell picture for a neutral isotope: Z protons and A-Z neutrons shown as P/N counts in the nucleus, and Z filled electron dots arranged by K through Q shells. A typeset caption carries isotope and shell counts. The circles mark shells, not measured electron paths.

bohrFilling Apas Cloud

Shows 0 through Z electron dots on a selected isotope's Bohr shells for a step-by-step school diagram. Intermediate steps are teaching stages of the final shell pattern.

orbitalDiagram Apas Cloud

Shows ground-state orbital boxes, configuration, and unpaired-electron count for an atom or monatomic ion. Supports full or compact noble-gas-core display.

orbitalFilling Apas Cloud

Shows the first step electrons of a selected atom's final ground-state pattern. Use a slider for an animated classroom walkthrough; intermediate steps are display stages, not physical excited states.

orbitalShape Apas Cloud

Shows labelled schematic orbital orientations for s, p, and d. For f, labels the seven magnetic sublevels without inventing spatial surfaces. Lobes are teaching illustrations, not probability surfaces or electron paths.

hybridisation Apas Cloud

Shows a supported single-central-atom VSEPR structure with bonding domains, lone pairs, shape, hybridisation model, ideal angles, and a measured angle when known; a homonuclear triatomic (O3, I3^-, N3^-) takes its middle atom as the centre. In <steps>, or as {{name}} in a paragraph, the line reads the hybridisation and shape in words (sp3d, trigonal bipyramidal); in <script> it draws.

hybridOrbitals Apas Cloud

Animated drawing of the school-level s/p mixing model and directional hybrid orbitals. sp3d and sp3d2 are formal domain labels, not a claim of literal d-orbital participation. sp3, sp3d and sp3d2 are drawn in perspective as a tetrahedron, a trigonal bipyramid and an octahedron, the nearer lobes larger.

bondingModel Apas Cloud

Shows sigma and pi bonding for an explicit ethene or ethyne C-C connection, with each carbon's hybridisation. The second pi plane in ethyne is labelled perpendicular.

moleculeLegacy Apas Cloud

Compatibility name for vsepr(). A formula does not uniquely identify most organic structures.

moleculeFormula Apas Cloud

Alias of vsepr() for formula-based VSEPR diagrams.

moleculeCompare Apas Cloud

Draws the VSEPR formula model and connectivity-based SMILES structure side by side for teaching their different purposes.

fischerProjection Apas Cloud

Draws a verified Fischer projection of D-glucose or D-fructose. Horizontal bonds point towards the reader; the carbonyl is near the top. Reusable in Chemistry and Biology lessons.

dnaLadder Apas Cloud

Shows complementary A–T and G–C base pairs and antiparallel 5′/3′ directions for a short DNA sequence.

sugarRing Apas Cloud

A Haworth ring of a D-sugar: any aldohexose as its pyranose (glucose, mannose, galactose, allose, altrose, gulose, idose, talose), ribose and 2-deoxyribose as furanoses, fructose as its furanose. One name ("alpha-D-mannopyranose") or the sugar, the anomer (alpha or beta) and optionally the ring word.

peptideBackbone Apas Cloud

Shows the N–Cα–C(=O) backbone, side chains and N/C termini of a short peptide. Supports Gly, Ala, Ser, Cys, Val and Lys.

nucleotide Apas Cloud

Shows the base, 1′–5′ sugar positions, phosphate and DNA/RNA 2′ difference in a component-level nucleotide diagram.

proteinSecondary Apas Cloud

Schematic alpha helix or beta sheet with backbone geometry and hydrogen-bond topology; not an atom-scale protein model.

Calculations

atomicNumber Apas Cloud

Returns an element’s atomic number from its symbol.

atomicWeight Apas Cloud

Returns the standard atomic weight of an element.

electronegativity Apas Cloud

Returns the Pauling electronegativity when the element has a tabulated value.

ionizationEnthalpy Apas Cloud

Ionisation enthalpy of the element in kJ/mol: the first by default, the second or third with order 2 or 3 (table values; NCERT XI Unit 3 agrees for the lighter elements). An error when the table has none (the second of H).

ionizationEnergy Apas Cloud

The same as ionizationEnthalpy.

electronGainEnthalpy Apas Cloud

Electron gain enthalpy in kJ/mol with NCERT's sign: negative when energy is released (Cl −348.6), positive for an unstable anion (He +48, predicted).

electronAffinity Apas Cloud

Electron affinity in kJ/mol, positive when energy is released (Cl 348.6): the negative of electronGainEnthalpy.

electronConfiguration Apas Cloud

Returns the ground-state electron configuration; choose compact for noble-gas notation.

molarMass Apas Cloud

Calculates molar mass in g mol⁻¹ from an element or chemical formula; a hydrate is written with a dot or a star, CuSO4·5H2O, CaSO4.2H2O or CaSO4*2H2O.

molesFromMass Apas Cloud

Converts a mass in grams to moles using the formula molar mass.

massFromMoles Apas Cloud

Converts moles to mass in grams using the formula molar mass.

particlesFromMoles Apas Cloud

Converts moles to particles using the SI Avogadro constant.

molesFromParticles Apas Cloud

Converts a particle count to moles using the SI Avogadro constant.

particlesFromMass Apas Cloud

Converts a mass in grams to a particle count for the given formula.

percentYield Apas Cloud

Calculates actual yield divided by theoretical yield, as a percentage.

degreeOfUnsaturation Apas Cloud

Calculates the degree of unsaturation from a molecular formula.

oxidationNumber Apas Cloud

Calculates the average oxidation number of the selected element in a formula, by the textbook rules in order (F -1; group 1 and 2 metals, Al, Zn, Ag; H -1 only in a hydride, beside a metal with nothing more electronegative than H, so PH3 and B2H6 have H +1; O -2 except beside F and in peroxides; Cl, Br, I -1 except beside O, F or a higher halogen) and the charge balance. A salt is read from its anion: FeSO4, Fe2(SO4)3, PbCrO4, FeSiO3, Cu(NO3)2 and hydrates such as CuSO4.5H2O give the metal's state from the anion's charge. In a binary compound the most electronegative non-metal of group 14, 15 or 16 is the anion: Cu2S is Cu +1, S -2; PbS, GaAs, SiC likewise. A result above the element's highest state counts the extra oxygens as peroxide: CrO5 is Cr +6 (four peroxide O), H2SO5 and K2S2O8 S +6; FeS2 is Fe +2, S -1. Two elements left to the balance are an error (ambiguous oxidation state): CuFeS2's metals, FeMnO4, an organic compound's C and S. A fraction where the average is one (KO2: -1/2; Fe3O4: 8/3). A third and fourth argument give another element's state: oxidationNumber("Fe2(C2O4)3", "C", "Fe", 3). In <steps> the formula is typeset upright with subscripts and the charge.

balanceReaction Apas Cloud

Balances a reaction and returns its coefficients in reactant-then-product order. When the atoms alone leave the balance ambiguous (H2O2 with KMnO4: the peroxide could also go to water), a second argument gives the electron count per formula unit, "KMnO4 gains 5, H2O2 loses 2", and electrons gained = electrons lost settles it.

molarity Apas Cloud

Calculates molarity in mol L⁻¹ from solute moles and solution volume in litres.

molality Apas Cloud

Calculates molality in mol kg⁻¹ from solute moles and solvent mass in grams.

moleFraction Apas Cloud

Calculates component moles divided by total moles.

massPercent Apas Cloud

Calculates solute mass as a percentage of solution mass.

ppm Apas Cloud

Calculates parts per million by mass.

dilutedConcentration Apas Cloud

Calculates final concentration using C₁V₁ = C₂V₂.

idealPressure Apas Cloud

Solves the ideal gas law for pressure in atm.

idealVolume Apas Cloud

Solves the ideal gas law for volume in litres.

idealMoles Apas Cloud

Solves the ideal gas law for amount in moles.

idealTemperature Apas Cloud

Solves the ideal gas law for temperature in kelvin.

pH Apas Cloud

Calculates pH from hydrogen-ion concentration in mol L⁻¹ using the dilute-solution convention.

pOH Apas Cloud

Calculates pOH from hydroxide-ion concentration in mol L⁻¹ using the 25 °C convention.

hydrogenFromPH Apas Cloud

Calculates hydrogen-ion concentration in mol L⁻¹ from pH.

hydroxideFromPOH Apas Cloud

Calculates hydroxide-ion concentration in mol L⁻¹ from pOH.

weakAcidHydrogen Apas Cloud

Solves the weak-acid equilibrium for hydrogen-ion concentration from initial concentration and Ka.

bohrEnergy Apas Cloud

Calculates the hydrogen-like Bohr energy level in eV for atomic number Z and principal level n (−13.6057 Z²/n² eV, a measured constant, so the value is approximate and a <steps> line shows it to six figures).

rydbergWavelength Apas Cloud

Calculates a hydrogen-like emission wavelength in metres for an initial level above a final level. Optional constant: hydrogen (default) or infinite_mass.

firstOrderConcentration Apas Cloud

Calculates remaining concentration for a first-order reaction.

firstOrderHalfLife Apas Cloud

Calculates first-order half-life from the rate constant.

secondOrderConcentration Apas Cloud

Calculates remaining concentration for a second-order reaction.

secondOrderHalfLife Apas Cloud

Calculates second-order half-life from initial concentration and rate constant.

arrheniusRate Apas Cloud

Calculates the rate constant at a second temperature using the Arrhenius relation. Activation energy is in J mol⁻¹ and temperatures are in kelvin.

gibbsFreeEnergy Apas Cloud

Calculates ΔG = ΔH − TΔS. Use J mol⁻¹, K, and J mol⁻¹ K⁻¹.

equilibriumKFromDeltaG Apas Cloud

Calculates the equilibrium constant from standard ΔG in J mol⁻¹ and temperature in kelvin.

cellEmf Apas Cloud

Calculates standard cell potential as cathode reduction potential minus anode reduction potential.

deltaGFromEmf Apas Cloud

Calculates ΔG = −nFE in joules per mole from electron count and cell emf in volts.