Tern Viz
Convert SMILES to a 3D rotating video. Check-out the Twitter bot @ternviz!
Install
You need to install both VMD and ffmpeg. After that:
pip install ternviz
Usage
It can be used to render stills, rotating videos, comparisons of molecules, and compilation videos of multiple proteins.
Render a molecule
To render a molecule:
ternviz CCCO
You may need to specify the path to VMD or ffmpeg:
ternviz CO --vmd /path/to/vmd/executable
You can modify a few things too:
ternviz CCCO --name "my molecule" --color white
try --low-quality to render quickly.
Render a protein
This will do a still frame
ternviz-pdb 1A1L
To do a rotating movie, specify number of frames (at 60 fps)
ternviz-pdb 1A1L --frames 60
You can pass in multiple PDBs
ternviz-pdb my.pdb other.pdb
You can specify how the structure is colored and other details
ternviz-pdb 1A1L --frames 60 --color white --scolor Chain
Aligning PDBs
You can align structures before rendering
ternviz-align ref.pdb *.pdb
by default it aligns on the protein. You can also change selection string, using MDAnalysis Selection String Syntax
ternviz-align ref.pdb --sel "chainid B" *.pdb
Example Render
https://user-images.githubusercontent.com/908389/147892964-c15ac0fd-44be-4473-b82a-799260e0f373.mp4
Metadata
Release files for ternviz 0.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ternviz-0.6.3.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ternviz-0.6.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.0 kB
Release files / ternviz-0.6.3.tar.gz
| Download URL | ternviz-0.6.3.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f90a290062c04e6134e9e55d726557e8b4a16d0368fc6593c5f1a42e89533b3
|
|
BLAKE2b-256 checksum How to use checksums |
edb3c2d5633b105fda7e1f85da862c68bd70c0b60a84596f94089c578e599a73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / ternviz-0.6.3-py3-none-any.whl
| Download URL | ternviz-0.6.3-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77f944210dd78cf8e7c0441eae1359238297789f9e1629da943522df4fe200cd
|
|
BLAKE2b-256 checksum How to use checksums |
e62ac361e3e445d71bf33678992731ae221874ab93ed4ae322cf3f1fe0256fc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|