Conformer search and ensembles
Rotation of ethanol’s hydroxyl group produces anti and two gauche orientations. Their heavy-atom frameworks are similar, while the O–H direction changes the molecular energy and dipole. This study searches those orientations, identifies distinct minima, and compares their electronic populations and ensemble weights.
Python source · Search and ensemble record · Refined geometries
Generate, relax, refine, and cluster
Section titled “Generate, relax, refine, and cluster”Native ethanol conformer search with g-xTB screening and PBE refinement
The search recovers anti and both gauche minima, with each refined structure checked by an analytical PBE Hessian. The two gauche energies agree within about 8 μeV; anti is approximately 0.016 eV higher in this model. Select Energy and weights for PBE energy differences and normalized electronic weights at 298.15 K. The O–H orientation changes even when the three heavy atoms nearly superimpose, so this study clusters all atoms and includes terminal rotors. Reflections remain distinct, retaining the two gauche orientations.
The search uses g-xTB for screening and PBE for refinement, with analytical forces at both stages. The code defines the method and search settings.
import numpy as npfrom atomli.analysis import run_conformer_ensemblefrom atomli.build import moleculefrom atomli.calculators import QC, XTB
def refined_calculator(): return QC(xc="PBE", basis="def2-svp", device="cpu", scf={"energy_tolerance": 1e-8}, maxiter=150)
ethanol = molecule("CH3CH2OH")ensemble = run_conformer_ensemble( ethanol, calculator=XTB(method="gxtb", device="cpu"), refine_calculator=refined_calculator(), max_conformers=18, include_terminal_rotors=True, coordinate_jitter=.015, seed=42, fmax=.01, max_steps=180, refine_optimize=True, refine_fmax=.003, refine_max_steps=180, heavy_atoms_only=False, allow_reflection=False, rmsd_threshold=.08, free_energy=False,)print(ensemble.relative_energies_ev)for conformer in ensemble.conformers: # Reattach a calculator before requesting properties of a copied structure. conformer.calc = refined_calculator() if np.linalg.norm(conformer.get_forces(), axis=1).max() > .003: raise RuntimeError("Refined conformer did not converge")A candidate limit bounds the search; it is not a completeness guarantee. Ring puckering, coupled torsions, protonation, tautomers, and disconnected electronic states can require additional inputs or a different search strategy. Increase sampling and verify that low-energy basins recur before treating an ensemble as converged.
Inspect torsions and duplicate criteria
Section titled “Inspect torsions and duplicate criteria”from atomli.analysis import detect_rotatable_bonds, generate_conformers, symmetry_rmsd
rotors = detect_rotatable_bonds(ethanol)for rotor in rotors: print(rotor.dihedral, rotor.moving_atoms, rotor.fold_symmetry)candidates = generate_conformers( ethanol, max_conformers=18, include_terminal_rotors=True, coordinate_jitter=.015, seed=42,)alignment = symmetry_rmsd(candidates[0], candidates[1], heavy_atoms_only=False, allow_reflection=False)print(alignment.rmsd, alignment.best_permutation)rmsd_threshold uses Å after molecular alignment and permitted graph
permutations. A heavy-atom criterion is often useful for larger frameworks;
ethanol’s hydroxyl orientations require hydrogen coordinates. Allowing
reflections can merge conformational enantiomers and changes state counting.
Save atom order, clustering settings, and representative indices with the result.
Electronic weights and physical degeneracy
Section titled “Electronic weights and physical degeneracy”The search records how many candidates entered each cluster. That hit count reflects the sampling strategy and is not a measured thermodynamic degeneracy. The published electronic comparison assigns unit degeneracy to each resolved minimum:
from atomli.analysis import cluster_conformers
conformers = ensemble.conformersenergies = [a.get_potential_energy() for a in conformers]weighted = cluster_conformers( conformers, energies, temperature_k=298.15, rmsd_threshold=0, heavy_atoms_only=False, allow_reflection=False, degeneracies=[1] * len(conformers),)print(weighted.weights, weighted.effective_conformer_count)The weights follow p_i ∝ g_i exp(−ΔE_i/kBT) here. They exclude vibrational,
rotational, solvent, and standard-state differences. The result class uses
free_energies_ev as its ranking-array name even when free_energy=False;
those entries contain electronic energies for this calculation.
Average charges and dipole magnitudes
Section titled “Average charges and dipole magnitudes”from atomli.analysis import Analysis
charges = [Analysis(a).charges("mulliken") for a in conformers]dipole_magnitudes = [np.linalg.norm(a.calc.get_dipole_moment()) for a in conformers]mean_charges = weighted.average_property(charges)mean_dipole_magnitude = weighted.average_property(dipole_magnitudes)A molecular dipole magnitude is an orientationally invariant scalar. Averaging Cartesian dipole vectors additionally requires a consistent molecular frame. Atomic averages require matching atom indices; remap equivalent atoms explicitly if structures came from independent files or graph permutations.
For thermodynamic ranking, relax every retained conformer with the final model,
validate its analytical Hessian, and compute consistent
QRRHO corrections. free_energy=True requests
that stage when the selected calculator supplies an analytical Hessian. g-xTB
currently supplies analytical forces but no public analytical Hessian, so PBE is
the Hessian provider in this workflow.