Skip to main content

No project description provided

Project description

moldenViz

PyPI - Version PyPI - Python Version Documentation Status


Installation

pip install moldenViz

Note: If you want to use the plotter, make sure python has access to tkinter

python3 -m tkinter

If python doesn't have access to tkinter, then you can install it with

macOS

brew install python-tk

Ubuntu

sudo apt-get install python-tk

Usage

If you don't have a molden file (then why are you using this package?) you can get some examples by doing

from moldenViz.examples import co

Plotter(co)

the total list of examples is:

  • co
  • o2
  • co2
  • h2o
  • benzene
  • prismane
  • pyridine
  • furan
  • acrolein

In the next examples, I'll be using 'molden.inp', but you can replace it with you molden-file path, or one of the examples.

Plotter

You can use the plotter to plot just the molecule

from moldenViz import Plotter

Plotter('molden.inp', only_molecule=True)

or to plot the molecular orbitals

from moldenViz import Plotter

Plotter('molden.inp')

Tabulator

You can use moldenViz to tabulate the GTOs and molecular orbitals

from moldenViz import Tabulator
import numpy as np

tab = Tabulator('molden.inp')

# Using a spherical grid
tab.spherical_grid(
    r = np.linspace(0, 5, 20),
    theta = np.linspace(0, np.pi, 20)
    phi = np.linspace(0, 2 * np.pi, 40)
)

# Or a cartesian grid
tab.cartesian_grid(
    x = np.linspace(-2, 2, 20)
    y = np.linspace(-2, 2, 20)
    z = np.linspace(-2, 2, 20)
)

print(tab.grid.shape)
print(tab.gtos_data.shape)

And to tabulate a molecular orbital

mo_data = tab.tabulate_mos(0)

or a list

mo_data = tab.tabulate_mos([0,1,4])

or a range

mo_data = tab.tabulate_mos(range(1, 10, 2))

or all of them

mos_data = tab.tabulate_mos()

Documentation

You can find the documentation here.

Roadmap

  • 0.1: Basic commands inside python.
    • 0.1.5: Documentation support
  • 0.2: Plotter.
  • 0.3: CLI options.

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

moldenviz-0.2.1.tar.gz (407.6 kB view details)

Uploaded Source

Built Distribution

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

moldenviz-0.2.1-py3-none-any.whl (281.1 kB view details)

Uploaded Python 3

File details

Details for the file moldenviz-0.2.1.tar.gz.

File metadata

  • Download URL: moldenviz-0.2.1.tar.gz
  • Upload date:
  • Size: 407.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for moldenviz-0.2.1.tar.gz
Algorithm Hash digest
SHA256 78042020a55b7a8c755565d1ae1daf789f853bb5953214123f80af91bd641469
MD5 17077f052d65d743300e4eada516c612
BLAKE2b-256 9c827c6a55d1db0f70c4508f55c596dd99c41bd0f291c5f89dcb136e801526f9

See more details on using hashes here.

File details

Details for the file moldenviz-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: moldenviz-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 281.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for moldenviz-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e15a6093417af15f4877c20b5579a442cbfe915c2e27a5f4e762bc32ebbf2be7
MD5 445b02507ae9fe0b93e76f9c0e97c27e
BLAKE2b-256 72a52f6e52c978bd9cad769275e70fca6ce50239fb05d03cd42218d96c135e04

See more details on using hashes here.

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