Giter Club home page Giter Club logo

ammolite's Introduction

Ammolite logo

Ammolite - From Biotite to PyMOL and back again

This package enables the transfer of structure related objects from Biotite to PyMOL for visualization, via PyMOL's Python API:

  • Import AtomArray and AtomArrayStack objects into PyMOL - without intermediate structure files.
  • Convert PyMOL objects into AtomArray and AtomArrayStack instances.
  • Use Biotite's boolean masks for atom selection in PyMOL.
  • Display images rendered with PyMOL in Jupyter notebooks.

Have a look at this example:


ammolite demo


PyMOL is a trademark of Schrodinger, LLC.

ammolite's People

Contributors

padix-key avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

ammolite's Issues

"Select" command does not work as instance method

Hello,

I encountered the problem that although it is stated in the Ammolite documentation that the "select" command is supported as instance method, applying this method to a PyMol object does not return a PyMol object, but a 'NoneType ' object. Here is the sample code:

# Import libraries
from biotite.structure.io.pdb import PDBFile
import numpy as np
import ammolite

ammolite.reset()

# Working on exercise one dealing with the ternary complex between
# Hsp 90, FKBP51 and P23
# Loading the structure into an AtomArray
pdb_file = PDBFile.read("7l7i.pdb")
atom_array = pdb_file.get_structure(
    model=1,
    include_bonds=True
)

# Converting the AtomArray to a PyMol object
pymol_ternary_complex = ammolite.PyMOLObject.from_structure(atom_array)

The variable pymol_ternary_complex stores a ammolite.PyMOLObject, as the following line of code demonstrates:

print(type(pymol_ternary_complex))

If pymol_ternary_complex, however, is used in order to make a selection via PyMol's select command, as shown in the following line of code:

pymol_ternary_complex.select(
    name="fkbp51",
    selection= atom_array.chain_id == "C"
)

the corresponding variable stores an object of type NoneType, raising an AttributeError when trying to perform operations on the selection, such as changing its colour.

Is this really a bug or do I merely have overlooked something in the documentation?

Thanks in advance.

Kind regards

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.