MolX
MolX is an interactive protein-structure viewer for graphical terminals. It opens PDB files, renders the molecule as a high-resolution raster, and lets you rotate and zoom without leaving the command line. It also connects to the ESM Metagenomic Atlas to fetch existing predictions or fold a short amino-acid sequence with the public ESMFold service.
The viewer uses the repository's rstui runtime and automatically selects
Kitty graphics, iTerm2 images, Sixel, or an ANSI truecolor fallback.
Build and run
Install the molx command from this checkout:
PDB viewer
MolX reads the first model in a PDB file, keeps the primary alternate location,
shows ATOM and HETATM records, and constructs a gap-aware C-alpha backbone
trace. Available representations are backbone, atoms, and combined.
Controls:
- Drag with the left mouse button, or use arrow keys /
h,j,k,l, to rotate. - Use the mouse wheel or
+/-to zoom. - Press
mto cycle molecular representations. - Press
cto cycle chain, element, and pLDDT/B-factor colors. - Press Space to toggle automatic rotation.
- Press
rto reset the camera andqor Escape to quit.
For ESMFold structures, --color auto selects the pLDDT palette used by the
Atlas: blue is high confidence and red is low confidence.
ESM Atlas
Download an existing prediction by MGnify protein identifier:
Fold one sequence using the public ESMFold endpoint:
Existing output files are preserved unless --force is passed. The public API
is rate-limited and intended for a small number of interactive predictions, not
bulk folding. MolX limits requests to 1,024 residues and uses a five-minute
request timeout. The Atlas data is distributed under CC BY 4.0; retain the
appropriate attribution when redistributing downloaded structures.
Official resources:
Current scope
This first version focuses on local PDB viewing and stable public ESM Atlas operations. mmCIF parsing, residue selection, surfaces, ligand bond inference, measurements, and sequence/structure search are natural next modules.