Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TCviewer-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TCviewer-0.1.2-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file TCviewer-0.1.2.tar.gz.

File metadata

  • Download URL: TCviewer-0.1.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for TCviewer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f03df49ab9fbbb30f4d660c41c1bf3e86f1caf60b35dd171fb0f356e8f6df465
MD5 c9932961f92456cbb45b935b75d2de7c
BLAKE2b-256 85da8a52be7fe543c38ae453f0a2a3d6e55776614232de128e085e67ac86ece2

See more details on using hashes here.

Provenance

The following attestation bundles were made for TCviewer-0.1.2.tar.gz:

Publisher: pypi_publish.yml on TheoChem-VU/TCviewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file TCviewer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: TCviewer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for TCviewer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b01eef2697dcc1be42a559103d72e28cfb6d1b133e90a78d7aefb7bc041872a
MD5 e05820a0d5c74373b10a72fae406adf2
BLAKE2b-256 f9890f7e9d66cf8c2bbde248ebfc607d4155445ffb1326fd3678340b0633188d

See more details on using hashes here.

Provenance

The following attestation bundles were made for TCviewer-0.1.2-py3-none-any.whl:

Publisher: pypi_publish.yml on TheoChem-VU/TCviewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page