src.server (4 August 2008)
index
/Users/d3y382/workspaces/apbs/pdb2pqr/branches/pdb2pqr-1.8/src/server.py

CGI Server for PDB2PQR
 
This module contains the various functions necessary to run PDB2PQR
from a web server.
 
----------------------------
 
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
       
os
string
sys
time

 
Functions
       
cleanTmpdir()
Clean up the temp directory for CGI.  If the size of the directory
is greater than LIMIT, delete the older half of the files.  Since
the files are stored by system time of creation, this is an
easier task.
createError(name, details)
Create an error results page for CGI-based runs
 
Parameters
    name:    The result file root name, based on local time (string)
    details: The details of the error (string)
createResults(header, input, name, time, missedligands=[])
Create the results web page for CGI-based runs
 
Parameters
    header: The header of the PQR file (string)
    input:   A flag whether an input file has been created (int)
    tmpdir:  The resulting file directory (string)
    name:    The result file root name, based on local time (string)
    time:    The time taken to run the script (float)
    missedligands: A list of ligand names whose parameters could
             not be assigned. Optional. (list)
setID(time)
Given a floating point time.time(), generate an ID.
Use the tenths of a second to differentiate.
 
Parameters
    time:  The current time.time() (float)
Returns
    id  :  The file id (string)

 
Data
        APBS_OPAL_URL = ''
DEFAULT_APBS_OPAL_URL = '0'
HAVE_APBS = ''
HAVE_PDB2PQR_OPAL = '0'
INSTALLDIR = '/Users/d3y382/pdb2pqr/'
LIMIT = 500.0
LOADPATH = '/proc/loadavg'
LOGPATH = '/Users/d3y382/pdb2pqr//tmp//usage.txt'
MAXATOMS = '10000'
PACKAGE_PATH = ''
PDB2PQR_OPAL_URL = ''
REFRESHTIME = 20
SRCPATH = '/Users/d3y382/workspaces/apbs/pdb2pqr/branches/pdb2pqr-1.8/'
STYLESHEET = 'http://PT24098/pdb2pqr/pdb2pqr.css'
TMPDIR = 'tmp/'
WEBNAME = 'index.html'
WEBSITE = 'http://PT24098/pdb2pqr/'
__author__ = 'Todd Dolinsky, Samir Unni, Yong Huang'
__date__ = '4 August 2008'

 
Author
        Todd Dolinsky, Samir Unni, Yong Huang