Basic Usage¶
Command Syntax¶
Every command follows this pattern:
Most commands have shortcuts so you don't need to type the full group name:
| You type | Expands to |
|---|---|
/load 1ake |
/io load 1ake |
/rep cartoon protein |
/representations cartoon protein |
/color red ligand |
/color color red ligand |
/measure distance A/45/CA B/120/CA |
/measurements distance A/45/CA B/120/CA |
/show organic |
/visibility show organic |
/hide solvent |
/visibility hide solvent |
/label ligand |
/labels smart ligand |
Autocomplete¶
The console supports tab-completion. Start typing a command and press Tab to see available options.
Five Practical Examples¶
1. Visualize a Protein with Ligand¶
/load 4HHB # Load hemoglobin
/rep cartoon protein # Protein as cartoon
/rep sticks organic # Ligands as sticks
/color bychain # Color chains differently
/hide solvent # Remove water clutter
/camera orient # Frame everything
2. Measure a Distance¶
The distance appears as a dashed line in the viewer and the value prints in the console.
3. Analyze Interactions¶
/load 3HTB # Load a protein-ligand complex
/interactions hbonds # Find hydrogen bonds
/interactions saltbridges # Find salt bridges
/interactions summary # Get interaction summary
4. Compare Two Structures¶
/load 1ake # Load open conformation
/load 4ake # Load closed conformation
/analysis align 1AKE 4AKE # Structural alignment
/analysis rmsd 1AKE 4AKE # Calculate RMSD
5. Create a Publication Figure¶
/load 1ake
/presets publication # High-quality preset
/color spectrum # Rainbow coloring
/rendering background white # White background
/export ray my_figure # Ray-traced image
Selection Syntax¶
codemol uses a selection syntax with convenient aliases:
| Alias | Resolves To | Meaning |
|---|---|---|
protein |
polymer.protein |
Protein chains |
ligand |
organic |
Small-molecule ligands |
solvent |
solvent |
Water molecules |
metals |
metals |
Metal ions |
backbone |
backbone |
Backbone atoms (N, CA, C, O) |
sidechain |
sidechain |
Side-chain atoms |
Chain/residue selections use the chain/residue/atom format:
A/45/CA # Chain A, residue 45, CA atom
A/45-50 # Chain A, residues 45-50
chain A # All of chain A
resi 45 # Residue 45 in any chain
Getting Help¶
- Type a partial command to see autocomplete suggestions
- Check the Command Reference for all available commands
- Use
/info listto see loaded structures