Molecular and Surface drawing program.
Project description
TCviewer
Quickly display molecules and surfaces with our TCviewer program. TCviewer is easy to use and yields beautiful figures.
Installation
Currently, the installation can be done by cloning this repository and having all necessary dependencies.
The following is for people who would like to install the repository themselves. For example, to edit and/or contribute code to the project.
First clone this repository:
git clone git@github.com:TheoChem-VU/TCviewer.git
Then move into the new directory and install the package:
cd TCviewer
python -m pip install --upgrade build
python -m build
python -m pip install -e .
To get new updates, simply run:
git pull
Usage
TCviewer exports the Screen
object which can be used to quickly build a scene. All the heavy work, such as setting up the camera, building and coloring meshes, will be done in the background. Please see the examples section for some simple example scripts for you to try out.
Examples
To draw a molecule, simply run:
from tcviewer import Screen
from scm import plams
molecule = 'path/to/molecule.xyz' # molecules can be given as paths to xyz files
molecule = plams.Molecule('path/to/molecule.xyz') # or as plams.Molecule objects
molecule.guess_bonds()
with Screen() as scr:
scr.draw_molecule(molecule)
To load and draw the HOMO:
from yutility import orbitals
from tcviewer import Screen, materials
import pathlib
rkf_dir = pathlib.Path(__file__).parents[0]/'data'/'NH3BH3'
# load orbitals and choose an MO to draw
orbs = orbitals.Orbitals(rkf_dir/'adf.rkf')
homo = orbs.mos['HOMO']
# generate a cube file
cub = homo.generate_orbital()
with Screen() as scr:
scr.draw_cub(cub, 0.03, material=materials.orbital_matte)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file TCviewer-0.0.0.tar.gz
.
File metadata
- Download URL: TCviewer-0.0.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a14ce3309730909df001c7260e16f0636a72e1dc44c2f22384c96d23bf1c2be |
|
MD5 | a6742267b96e3a96339a74e4467b1af0 |
|
BLAKE2b-256 | b5969973d3b2f4d317613ec2dc99ebd1efcf4eab79de52f8db72c902a9ed07ff |
File details
Details for the file TCviewer-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: TCviewer-0.0.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce767047f2b311fd88e63779598c1ca89fdc6ae5c7c89d4b1d0b31a7fb18824d |
|
MD5 | cd12d36d0faba33f7778e0ad4aae1542 |
|
BLAKE2b-256 | 58a7bd5a16c31781663cc11a06a1c1573cea75b7819fee5041b2a190e6ec529b |