Giter VIP home page Giter VIP logo

apbs_qt_plugin's Introduction

APBS_Qt_plugin

This is an experimental port of the APBS Tools plugin for PyMol version 2.x. It's under development and not ready for production use; I'm writing it as an exercise to learn PyQt.

Note that this is only relevant for the open-source fork of PyMOL; this functionality is included by default in the incentive fork of PyMOL provided by Schrodinger.

Background

The APBS (Adaptive Poisson-Boltzmann Solver) Tools plugin is used to compute macromolecular electrostatic charges and visualize this information as a potential surface in PyMOL. It does this by calling the apbs code; optionally, pdb2pqr is called to preprocess input files; see poissonboltzmann.org.

The current version of the plugin (version 2.1) was written against the tkinter GUI library used in PyMOL 1.x; version 2.x of PyMOL migrated to PyQt. There is legacy support for tkinter-based plugins (not implemented in the APBS Tools plugin), but I wanted to take this as an opportunity to update it to PyQt.

Installation

Since development is still in progress, currently the only supported installation method is through conda. If conda isn't installed, download Miniconda3.

If you're installing on an arm-based mac, you'll need

export CONDA_SUBDIR="osx-64"

since arm-based builds of apbs aren't available on conda (and my attempts to build from source have failed so far.) Note that conda packages for apbs have fallen behind tagged releases.

Then do

conda env create -f=conda.yml; conda activate APBS_Qt_Plugin

To add the plugin in PyMol, select the APBS_Qt_plugin directory in the Plugins manager.

Screenshots

Original UI UI in incentive fork This code

Design considerations

I've attempted to reorganize the code along the lines of the (hierarchical) Model-View-Controller pattern. This is absolutely overkill for an application whose scope is this small, but I wanted to use the project as a way to explore coding practices that scale to large applications.

At least subjectively, this has felt like "going against the grain" of PyQt's intentions. Qt's use of Model/View terminology refers to something subtantively different, as clarified in this SO post. UI widgets operate according to an event-driven paradigm using signals and slots, but neither PyQt's *Model objects or the base data types wrapped from C++ Qt have predefined signals or slots: these need to be defined manually on the Model class (as in this example), which results in boilerplate code and redundant definitions.

The solution I've used here (perhaps the most novel part of this project) is to combine a solution proposed here with the attrs package to automate defintion of Signals and Slots on the Model classes. This is done in util.py.

Credits

The original APBS Tools plugin was written by Michael G. Lerner in 2009, with contributions from Heather A. Carlson and Warren L. DeLano. The current version is available here.

Users of apbs and pdb2pqr are strongly encouraged to register their use at poissonboltzmann.org, as this is key to securing funding for continued development of this software.

Citation for apbs:  Baker NA, Sept D, Joseph S, Holst MJ, McCammon JA. Electrostatics of nanosystems: application to microtubules and the ribosome. Proc. Natl. Acad. Sci. USA 98, 10037-10041 (2001); doi/10.1073/pnas.181342398; PMID: 11517324; PMCID: PMC56910.

Citation for pdb2pqr:  Dolinsky TJ, Nielsen JE, McCammon JA, Baker NA. PDB2PQR: an automated pipeline for the setup, execution, and analysis of Poisson-Boltzmann electrostatics calculations. Nucleic Acids Research 32 W665-W667 (2004). doi/10.1093/nar/gkh381; PMID: 15215472; PMCID: PMC441519.

apbs_qt_plugin's People

Contributors

tsj5 avatar

Stargazers

 avatar

Watchers

 avatar

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.