Giter Club home page Giter Club logo

molecular-blender's Introduction

Molecular Blender Build

An import plugin specialized for .xyz files of molecules used in, for example, quantum chemistry

Capabilities

  • imports using linked objects making rapid changes to the aesthetics feasible
  • basic styling (stick model, VDW, ball and stick, wireframe) and sensible defaults
  • support for animations (input as multiframe .xyz files) including dynamically drawing bonds
  • find and fill in aromatic rings
  • draw spheres sitting on atoms to represent atomic charges and dynamically scale them during an animation
  • draw molecular orbital isosurfaces with .cube files or .molden files

Installation

There are two basic ways to install Molecular Blender, depending on whether you want to use the optional cython enhanced isosurface routines (highly recommended, if you're drawing isosurfaces at all).

Using setup.py (cython compatible)

The most robust way to install is to use the included setup.py.

cd /path/to/molecular/blender/repo
python3 setup.py build
python3 setup.py link

This will build the cython extensions to the code and then create symlinks to all of the versions of blender found in the normal blender install directories (only tested on macOS). For this to work, you'll need to use python 3.7 (the same version used in Blender 2.80), and have cython installed for it. The same setup can be used to export a build:

python3 setup.py build
python3 setup.py export

This will create a zip file that should be compatible with the add-on installation machinery of blender itself.

Direct symlink (no cython)

If you are okay with skipping sython, you can directly symlink from the python package to the blender scripts directory. The non-cython version has all the same functionality as the cython version, but may be significantly slower for certain tasks (cython version is roughly 100 times faster at drawing orbitals from molden files).

ln -s /path/to/molecular/blender/repo/molecular_blender /path/to/blender/scripts/addons/

and then it should appear in the list of Import-Export addons that can be activated like any other addon.

On Mac OS X, the path for a user supplied addon is

/Users/<username>/Library/Application\ Support/Blender/<version>/scripts/addons

where <username> and <version> should be replaced with your username and the Blender version you are using.

Design

The only guiding design principle so far has been to try and separate the molecular data structures (Molecule, Bond, Atom) from the Blender manipulations. This is subject to change.

molecular-blender's People

Contributors

jeszekely avatar smparker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

molecular-blender's Issues

Import multiple molecules

If two molecules are imported into the same scene, the second one literally explodes... all the atoms and bonds are scattered in seemingly random locations.

Styles

We should be able to specify styles (ball and stick, sticks, VDW) from the input. Internally, they should all be plotted with the same function, just with different scale factors etc. for each style. Style should also probably control whether bonds are drawn.

Thinning/disappearing bonds

A really neat visual effect would be for bonds to narrow or to turn more transparent as they reach their breaking point. This could be accomplished by keyframing bond radius or transparency according to some sufficiently sharp function of bond length.

Molecule and Bond organizing classes

At some point we should probably make a molecule class that organizes all the atoms and bonds for a given import and helps make unique names. This will make it a lot easier to deal with importing from multiple files, should we ever want to support that.

At the same time, a Bond class could be helpful to facilitate some more advanced future features or animations by holding onto the bond name, all of the masking info, material info, etc.

Do PlotAtoms and PlotBonds do anything?

They aren't called by anything currently. If they actually do something different than PlotMolecule, then we should merge functionality. If not, we should get rid of them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.