GithubHelp home page GithubHelp logo

csu-xiao-an / molecularvolume Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajd98/molecularvolume

0.0 2.0 0.0 272 KB

Utilities for molecular volume calculation

Python 79.71% C 19.32% Makefile 0.97%

molecularvolume's Introduction

Molecular volume calculations

Purpose

This software implements voxel-based volume calculations for molecular systems, via a Python interface.

The volume is defined as the region of space that is not accessible to solvent molecules; more exactly, the volume is calculated as the sum of the volumes of those voxels such that a (spherical) solvent molecule of radius r positioned at the center of the voxel does not intersect any solute atom i, which is represented as a sphere of radius si and position pi. The solvent radius r, and the radius si and position pi of each solute atom is specified by the user. A flood-fill algorithm (think of the paint bucket in MS Paint, except in three dimensions) is used to determine which voxels are accessible to solvent, such that void space in the interior of the solute is included as part of the volume.

Requirements:

Software requirements:

  • gcc (version >=6.3)
  • Python (version 2.7 or 3.6)

Required Python packages:

  • Numpy
  • Cython
  • argparse
  • distutils

Hardware requirements:

  • 12+ GB ram

Installation

After cloning this git repository, navigate to the ./src directory via a command line, and run make install.

Following installation, navigate to the ./test directory, make sure that python is in your $PATH, and run python test.py. All of the tests should pass; note that a large amount of memory (8+ GB) is needed for some of the tests.

Python interace to volume calculations

Installation produces a shared object volume.so (or a similarly named .so file) that may be imported from Python as:

import volume

Multiple functions are provided by the volume object:

volume.volume_explicit_sol: Positions of solvent molecules must be explicitely provided, and the flood-fill algorithm extends from the position of every solvent molecule. Voids in the solute with clathrate solvent are thus not included in the volume, while voids not occupied by solvent are included in the volume.

-----------
Parameters
-----------
_solute_pos: shape (n,3) array of (x,y,z) coordinates of solute atoms
_solute_rad: shape (n,) array of solute atom radii
_solvent_pos: shape (m,3) array of (x,y,z) coordinates of solvent atoms
_solvent_rad: solvent molecule radius; solvent is approximated as sphere
_voxel_len: edge length of voxels

-------------
Returns
-------------
The volume that is accessible to the centers of the water molecules

volume.volume: Assumes all provided atomic coordinates correspond to solute; the flood-fill algorithm extends from the region exterior to the provided atoms. Since the mesh of voxels need not be large enough to include solvent molecules, this function will be faster than volume_explicit_sol.

-----------
Parameters
-----------
_solute_pos: shape (n,3) array of (x,y,z) coordinates of solute atoms
_solute_rad: shape (n,) array of solute atom radii
_solvent_rad: solvent molecule radius; solvent is approximated as sphere
_voxel_len: edge length of voxels

-------------
Returns
-------------
The volume that is accessible to the centers of a water molecule on the 
exterior of the protein.

Additional tools

genradiilib.py: This tool in combination with pdb2volume.py facilitates calculation of molecular volumes of proteins simulated using the Amber software package. genradiilib.py reads an Amber parameter file (.parm7) and calculates the van der Waals radii of each atom used in the simulation. This information is written to a file (radii.lib by default) that may be loaded by pdb2volume.py. Run python genradiilib.py --help for more information on specific command line arguments.

pdb2volume.py: This tool calculates the volume of a molecule(s) specified by a PDB file. The tool requires a radii.lib file, which may be generated by genradiilib.py, or by hand. The radii.lib file should be formatted as follows:

  • columns 1-3: three-letter residue identifier (e.g., ALA, ARG, ...)
  • columns 5-8: one to four letter atom name (see test/radii.lib for examples).
  • columns 9-14: van der Waals radius (in whatever units you desire)

Run python pdb2volume.py --help for more information on specific command line arguments.

molecularvolume's People

Contributors

ajd98 avatar

Watchers

James Cloos avatar  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.