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 get it from the latest python version, or

macOS

brew install python-tk

Ubuntu

sudo apt-get install python-tk

Usage

CLI

To run moldenViz with a molden file, you can do

moldenViz molden.inp

you can instead use examples

moldenViz -e co

a full list of examples can be found below.

You can also choose to only plot the molecule

moldenViz molden.inp -m

For more details, you can do

moldenViz -h

Inside python

If you don't have a molden file, you can get examples by doing

from moldenViz import Plotter
from moldenViz.examples import co

Plotter(co)

the 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 your 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

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.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.
  • 1.0: Improved documentation and config file for plot settings
  • 2.0: Support for cartesian functions.
  • 3.0: Tabulation and plot of different quantities

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-1.0.0.tar.gz (420.4 kB view details)

Uploaded Source

Built Distribution

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

moldenviz-1.0.0-py3-none-any.whl (290.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for moldenviz-1.0.0.tar.gz
Algorithm Hash digest
SHA256 72256909d1147b0514f8cca250f2e4d59bb9ec3a5d735e32ea137853c50f6d6e
MD5 11e509804427c9264772dcfee61b95e5
BLAKE2b-256 9d4be29e17af5687acf87826b797cba6ce3bed36b43acb1801e5c1f4cfa418fc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for moldenviz-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff612d11e19504b2b99abfbb84ba9101f9186bc90c052042e38620c3ac0659a
MD5 76042d04696e2665c81d0c119e53b14e
BLAKE2b-256 c81093733b068f10abb109316e9a0b219f3108ecf4b48111ec03a0bcef6f79e9

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