0.0.0Manages file import/export operations Handles XYZ format and coordinate conversions
(any)
Controls geometry manipulation sliders and operations Handles bond length, angle, and dihedral adjustments
(any)
Bind geometry slider events
Bind bond length slider
Bind angle slider
Bind dihedral slider
Calculate distance between two points
(THREE.Vector3)
(THREE.Vector3)
number:
Distance in Angstroms
Calculate angle between three points (p1-p2-p3)
(THREE.Vector3)
(THREE.Vector3)
Vertex
(THREE.Vector3)
number:
Angle in degrees
Calculate dihedral angle (p1-p2-p3-p4)
(THREE.Vector3)
(THREE.Vector3)
(THREE.Vector3)
(THREE.Vector3)
number:
Dihedral angle in degrees
Calculate new positions for bond length adjustment Moves 'movingAtoms' to satisfy target distance between atom1 and atom2
(THREE.Vector3)
Position of fixed atom
(THREE.Vector3)
Position of moving atom (pivot)
(Array<THREE.Vector3>)
Positions of all atoms to move (including pos2)
(number)
Target distance
Array<THREE.Vector3>:
New positions for moving atoms
Calculate new positions for bond angle adjustment Rotates 'movingAtoms' around axis (pivot-normal) to satisfy target angle p1-pivot-p3
(THREE.Vector3)
Fixed atom position
(THREE.Vector3)
Pivot atom position (vertex)
(THREE.Vector3)
Moving atom position (defines current angle)
(Array<THREE.Vector3>)
Atoms to rotate
(number)
Target angle in degrees
Array<THREE.Vector3>:
New positions
Calculate new positions for dihedral angle adjustment Rotates 'movingAtoms' around axis p2-p3
(THREE.Vector3)
(THREE.Vector3)
Axis start
(THREE.Vector3)
Axis end
(THREE.Vector3)
(Array<THREE.Vector3>)
Atoms to rotate
(number)
Target dihedral
Array<THREE.Vector3>:
New positions
Calculate center of mass of atoms
THREE.Vector3:
Center of mass
Get positions rotated by Euler angles (degrees) around (0,0,0)
Array<THREE.Vector3>:
Get translated positions
Array<THREE.Vector3>:
Calculate smart offset to avoid overlap
(number)
Minimum distance required
THREE.Vector3:
Offset vector
Manages 3D rendering of atoms and bonds Handles mesh creation, color management, and scene updates
(any)
Update colors for all atoms based on current color scheme
Update bond meshes
Rebuild entire scene from scratch
Update bond visuals
Manages atom selection state and UI Handles selection highlighting, order tracking, and status updates
(any)
Clear all selections
Select all atoms
Invert selection
Cycle through selection modes
Update selection status display
Clear selection status display
Update highlights for all atoms (refresh visual state)
Manages UI interactions, modals, and labels Handles toolbar events, periodic table, coordinate editor, and atom labels
(any)
Bind all toolbar button events
Bind mode selection buttons (edit/select/move)
Bind view control buttons
Bind label toggle button
Bind export PNG button
Bind molecule management buttons
Update label button text to reflect current mode
Close periodic table modal
Open coordinate editor modal
Close coordinate editor modal
Toggle modal maximize
(HTMLElement)
Modal element
Export current view as PNG
Create label element for an atom
(Object)
Atom object
HTMLElement:
Label element
Update label text for an atom
(Object)
Atom object
(HTMLElement
= null)
Label element (optional, will find if not provided)
Update all atom labels
Update label positions (2D screen coordinates)
Centralized error handling utility Provides consistent error/success response format across the application
Optimized label rendering with dirty checking and RAF batching Reduces DOM updates from every frame to only when needed
Initialize renderer with references
(THREE.Camera)
Camera for projection
(HTMLCanvasElement)
Canvas for size
Mark all labels as dirty
Schedule a label update using requestAnimationFrame Ensures updates happen at most once per frame
Update only dirty labels in batched manner Separates DOM reads and writes to minimize reflow
Update all labels (fallback for full updates) Used when camera moves or all labels need refresh
Cancel any pending update
Cleanup
Object pool for THREE.Vector3 to reduce garbage collection Reuses Vector3 instances instead of creating new ones
(any
= 100)