src.psize (4 June 2008) | index /Users/d3y382/workspaces/apbs-pdb2pqr/pdb2pqr/src/psize.py

`psize class
Get dimensions and other information from a PQR file.
Originally written by Dave Sept
Additional APBS-specific features added by Nathan Baker
Ported to Python/Psize class by Todd Dolinsky and subsequently
hacked by Nathan Baker
----------------------------
PDB2PQR -- An automated pipeline for the setup, execution, and analysis of
Poisson-Boltzmann electrostatics calculations
Copyright (c) 2002-2011, Jens Erik Nielsen, University College Dublin;
Nathan A. Baker, Battelle Memorial Institute, Developed at the Pacific
Northwest National Laboratory, operated by Battelle Memorial Institute,
Pacific Northwest Division for the U.S. Department Energy.;
Paul Czodrowski & Gerhard Klebe, University of Marburg.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of University College Dublin, Battelle Memorial Institute,
Pacific Northwest National Laboratory, US Department of Energy, or University
of Marburg nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------`

Modules

``

getopt | string | sys |

Classes

``

Psize

class Psize
`` | `Master class for parsing input files and suggesting settings`

Methods defined here:

__init__(self)

getCenter(self)

getCharge(self)

getCoarseGridDims(self)

getConstant(self, name)
  `Get a constant value; raises KeyError if constant not found`

getFineGridDims(self)

getFineGridPoints(self)

getFocus(self)

getLength(self)

getMax(self)

getMin(self)

getProcGrid(self)

getSmallest(self)

parseInput(self, filename)
  `Parse input structure file in PDB or PQR format`

parseLines(self, lines)
  `Parse the lines`

parseString(self, structure)
  `Parse the input structure as a string in PDB or PQR format`

printResults(self)
  `Return a string with the formatted results`

runPsize(self, filename)
  `Parse input PQR file and set parameters`

setAll(self)
  `Set up all of the things calculated individually above`

setCenter(self, maxlen, minlen)
  `Compute molecule center`

setCoarseGridDims(self, olen)
  `Compute coarse mesh dimensions`

setConstant(self, name, value)
  `Set a constant to a value; returns 0 if constant not found`

setFineGridDims(self, olen, clen)
  `Compute fine mesh dimensions`

setFineGridPoints(self, flen)
  `Compute mesh grid points, assuming 4 levels in MG hierarchy`

setFocus(self, flen, np, clen)
  `Calculate the number of levels of focusing required for each
  processor subdomain`

setLength(self, maxlen, minlen)
  `Compute molecule dimensions`

setProcGrid(self, n, nsmall)
  `Calculate the number of processors required to span each
  dimension`

setSmallest(self, n)
  `Compute parallel division in case memory requirement above ceiling
  Find the smallest dimension and see if the number of grid points in
  that dimension will fit below the memory ceiling
  Reduce nsmall until an nsmall^3 domain will fit into memory`

Functions

``

log(...)
  `log(x[, base])
  Return the logarithm of x to the given base.
  If the base not specified, returns the natural logarithm (base e) of x.`

main()

usage(rc)
  `Print usage information and exit with error code rc`

Data
`` |  | __author__ = 'Dave Sept, Nathan Baker, Todd Dolinsky, Yong Huang' __date__ = '4 June 2008' stderr = <open file '<stderr>', mode 'w'> stdout = <open file '<stdout>', mode 'w'>

Author
`` |  | Dave Sept, Nathan Baker, Todd Dolinsky, Yong Huang