[med-svn] [Git][med-team/pdb2pqr][master] 3 commits: Adding license paragraph for PDB data.

Andrius Merkys (@merkys) gitlab at salsa.debian.org
Thu Mar 3 08:42:51 GMT 2022



Andrius Merkys pushed to branch master at Debian Med / pdb2pqr


Commits:
fffc1cf7 by Andrius Merkys at 2022-03-03T02:47:42-05:00
Adding license paragraph for PDB data.

- - - - -
62f0983a by Andrius Merkys at 2022-03-03T02:49:12-05:00
Dropping no longer needed patches.

- - - - -
4661b22e by Andrius Merkys at 2022-03-03T02:49:43-05:00
Update changelog for 3.5.2+dfsg-1 release

- - - - -


6 changed files:

- debian/changelog
- debian/copyright
- − debian/patches/no_privacy_breach_logo.patch
- − debian/patches/python3_PR516.patch
- − debian/patches/python3_scriptbang.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-pdb2pqr (3.5.2+dfsg-1) UNRELEASED; urgency=medium
+pdb2pqr (3.5.2+dfsg-1) unstable; urgency=medium
 
   * Team upload.
   * New upstream version 3.5.2+dfsg (Closes: #1005971)
@@ -9,7 +9,7 @@ pdb2pqr (3.5.2+dfsg-1) UNRELEASED; urgency=medium
   * Update patches, debian/copyright and debian/README.test.
   * Drop debian/README.Debian: not needed any more.
 
- -- Andrius Merkys <merkys at debian.org>  Fri, 18 Feb 2022 05:52:25 -0500
+ -- Andrius Merkys <merkys at debian.org>  Thu, 03 Mar 2022 02:49:34 -0500
 
 pdb2pqr (2.1.1+dfsg-8) unstable; urgency=medium
 


=====================================
debian/copyright
=====================================
@@ -47,6 +47,57 @@ Files: pdb2pqr/dat/AA.xml
 Copyright: 2002-2011, Jens Erik Nielsen, University College Dublin
 License: BSD-3-Clause
 
+Files: examples/1a1p/1a1p.pdb
+ tests/data/*.pdb
+Copyright: Protein Data Bank
+License: PDB
+ Data files contained in the PDB archive (https://ftp.wwpdb.org) are free
+ of all copyright restrictions and made fully and freely available for
+ both non-commercial and commercial use. Users of the data should
+ attribute the original authors of that structural data. By using the
+ materials available in the PDB archive, the user agrees to abide by the
+ conditions described in the PDB Advisory Notice.
+ .
+ ADVISORY NOTICE FOR USE OF THE PDB ARCHIVE
+ .
+ By using the materials available in this archive, the user agrees to abide
+ by the following conditions:
+ .
+  * The archival data files in the PDB archive are made freely available
+  to all users. Data files within the archive may be redistributed in original
+  form without restriction. Redistribution of modified data files using the same
+  file name as is on the FTP server is prohibited. The rules for file names are
+  detailed at http://www.wwpdb.org/wwpdb_charter.html.
+ .
+  * Data files containing PDB content may incorporate the PDB 4-letter entry
+  name (e.g. 1ABC) in standard PDB records only if they are exactly the same
+  as what is residing in the PDB archive. This does not prevent databases
+  from including PDB entry_id's as cross-references where it is clear that
+  they refer to the PDB archive. PDB records refer to the standard PDB format.
+  The distribution of modified PDB data including the records HEADER, CAVEAT,
+  REVDAT, SPRSDE, DBREF, SEQADV, and MODRES in PDB format and their mmCIF and
+  XML equivalents is not allowed.
+ .
+  * The user assumes all responsibility for insuring that intellectual property
+  claims associated with any data set deposited in the PDB archive are honored.
+  It should be understood that the PDB data files do not contain any information
+  on intellectual property claims with the exception in some cases of a reference
+  for a patent involving the structure.
+ .
+  * Any opinion, findings, and conclusions expressed in the PDB archive by the
+  authors/contributors do not necessarily reflect the views of the wwPDB..
+ .
+  * The data in the PDB archive are provided on an "as is" basis.  The wwPDB
+  nor its comprising institutions cannot be held liable to any party for direct,
+  indirect, special, incidental, or consequential damages, including lost
+  profits, arising from the use of PDB materials.
+ .
+  * Resources on this site are provided without warranty of any kind, either
+  expressed or implied. This includes but is not limited to merchantability or
+  fitness for a particular purpose. The institutions managing this site make
+  no representation that these resources will not infringe any patent or other
+  proprietary right.
+
 Files: debian/*
 Copyright: 2007-2010, Steffen Moeller <moeller at debian.org>
  2010-2012, Manuel Prinz <manuel at debian.org>


=====================================
debian/patches/no_privacy_breach_logo.patch deleted
=====================================
@@ -1,46 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Sat, 19 Apr 2014 15:49:25 +0200
-Description: remove potential privacy breach logo
-
---- a/doc/userguide.html
-+++ b/doc/userguide.html
-@@ -768,7 +768,7 @@
- 		</ul>
- 		<hr>
- 		<center>
--			<a href="http://sourceforge.net"><img align="middle" src="http://sourceforge.net/sflogo.php?group_id=144228&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"></a>   <a href="http://sourceforge.net/projects/pdb2pqr">SourceForge Project Page</a>
-+			<a href="http://sourceforge.net/projects/pdb2pqr">SourceForge Project Page</a>
- 		</center>
- 		<hr>
- 		<center>
---- a/examples/index.html
-+++ b/examples/index.html
-@@ -245,7 +245,7 @@
-         </ol>
- 		<hr>
- 		<center>
--			<a href="http://sourceforge.net"><img align="middle" src="http://sourceforge.net/sflogo.php?group_id=144228&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"></a>   <a href="http://sourceforge.net/projects/pdb2pqr">SourceForge Project Page</a>
-+			<a href="http://sourceforge.net/projects/pdb2pqr">SourceForge Project Page</a>
- 		</center>
- 		<hr>
- 		<center>
---- a/html/master-index.html
-+++ b/html/master-index.html
-@@ -188,7 +188,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
- 		<hr/>
- 
- 		<center>
--			<a href="http://sourceforge.net"><img align="middle" src="http://sourceforge.net/sflogo.php?group_id=144228&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>   <a href="http://sourceforge.net/projects/pdb2pqr">SourceForge Project Page</a>
-+			<a href="http://sourceforge.net/projects/pdb2pqr">SourceForge Project Page</a>
- 		</center>
- 
- 		<hr/>
-@@ -198,8 +198,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
- 			</small>
- 		</center>
- 
--		<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
--		</script>
- 		<script type="text/javascript">
- 			_uacct = "UA-1809259-4";
- 			urchinTracker();


=====================================
debian/patches/python3_PR516.patch deleted
=====================================
@@ -1,2552 +0,0 @@
---- a/apbs_cgi.py
-+++ b/apbs_cgi.py
-@@ -1235,7 +1235,7 @@
-     apbsOptions['calculationType'] = myElec.method
-     apbsOptions['dime'] = myElec.dime
-     apbsOptions['pdime'] = myElec.pdime
--    apbsOptions['async'] = myElec.async
-+    apbsOptions['async'] = myElec.async_
-     apbsOptions['asyncflag'] = myElec.asyncflag
-     apbsOptions['nlev'] = myElec.nlev
-     apbsOptions['glen'] = myElec.glen
---- a/conf_avg/Ensemble_phimap.py
-+++ b/conf_avg/Ensemble_phimap.py
-@@ -195,7 +195,6 @@
-         #
-         #
- 		method=""
--		async=0
- 		split=0
- 		import pdb2pka.inputgen_pKa as IP
- 		igen = IP.inputGen(currentPDB)
---- a/extensions/__init__.py
-+++ b/extensions/__init__.py
-@@ -53,7 +53,7 @@
- extDict = {}
- 
- for extName in _extList:
--    extDict[extName] = __import__(extName,globals(),locals(),[], -1)
-+    extDict[extName] = __import__(extName,globals(),locals(),[],1)
-     
- def setupExtensionsOptions(parser):
-     """
-@@ -95,8 +95,8 @@
-             else:
-                 firstGroup.add_option(extOption)
-                 
--        except OptionConflictError, value:
--            print 'Error adding command line options for extension ' + extName + ' ' + '(' + str(value) + ')'
-+        except OptionConflictError as value:
-+            print('Error adding command line options for extension ' + extName + ' ' + '(' + str(value) + ')')
-             
-     
-     for group in groups:
-@@ -114,4 +114,4 @@
- 
-     def write(self, s):
-         self.routines.write(s)
--        self.outfile.write(s)
-\ No newline at end of file
-+        self.outfile.write(s)
---- a/extensions/newresinter.py
-+++ b/extensions/newresinter.py
-@@ -10,7 +10,7 @@
- import extensions
- from src.hydrogens import Optimize
- #itertools FTW!
--from itertools import product, permutations, izip, count
-+from itertools import product, permutations, count
- from src.hydrogens import hydrogenRoutines
- 
- #Here are the Ri -> [Ri0, Ri1] maps:
-@@ -196,7 +196,7 @@
-         """
-         Output the interaction energy between each possible residue pair.
-         """
--        for resultKey in sorted(self.pairEnergyResults.iterkeys()):
-+        for resultKey in sorted(self.pairEnergyResults.keys()):
-             self.output.write(resultKey + ' ' + str(self.pairEnergyResults[resultKey]) + '\n')
-         
-         self.routines.write(str(self.combinationCount)+' residue combinations tried\n')
-@@ -220,7 +220,7 @@
-         
-         self.routines.removeHydrogens()
-         
--        for newResidueName, oldResidue, index in izip(residueSet, self.routines.protein.getResidues(), count()):
-+        for newResidueName, oldResidue, index in zip(residueSet, self.routines.protein.getResidues(), count()):
-             if newResidueName is None:
-                 continue
-             
-@@ -291,7 +291,7 @@
-     """    
-     protonatedNames = get_residue_titration_set_protonated(residues)
-     
--    for name, i in izip(protonatedNames, count()):
-+    for name, i in zip(protonatedNames, count()):
-         if not name in _titrationSetsMap:
-             continue
-         
-@@ -312,12 +312,12 @@
-     """    
-     protonatedNames = get_residue_titration_set_protonated(residues)
-     
--    for i in xrange(0,len(protonatedNames)):
-+    for i in range(0,len(protonatedNames)):
-         firstName = protonatedNames[i]
-         if not firstName in _titrationSetsMap:
-             continue
-         firstStateSet = _titrationSetsMap[firstName][0]
--        for j in xrange(0,i):
-+        for j in range(0,i):
-             secondName = protonatedNames[j]
-             if not secondName in _titrationSetsMap:
-                 continue            
---- a/extensions/resinter.py
-+++ b/extensions/resinter.py
-@@ -10,7 +10,7 @@
- import extensions
- from src.hydrogens import Optimize
- #itertools FTW!
--from itertools import product, permutations, izip, count
-+from itertools import product, permutations, count
- from collections import defaultdict
- from src.hydrogens import hydrogenRoutines
- 
-@@ -233,7 +233,7 @@
-     
-     routines.removeHydrogens()
-     
--    for newResidueName, oldResidue, index in izip(residueSet, routines.protein.getResidues(), count()):
-+    for newResidueName, oldResidue, index in zip(residueSet, routines.protein.getResidues(), count()):
-         if newResidueName is None:
-             continue
-         
-@@ -291,7 +291,7 @@
-     
-     routines.write("Testing the following combinations\n")
-     namelist = [r.name for r in routines.protein.getResidues()]
--    combinationsData = izip(namelist, residueNamesList)
-+    combinationsData = zip(namelist, residueNamesList)
-     for thing in combinationsData:
-         routines.write(str(thing)+'\n')
-         
-@@ -313,7 +313,7 @@
-                             debump = options.debump,
-                             opt = options.opt)
-         
--    for resultKey in sorted(_pairEnergyResults.iterkeys()):
-+    for resultKey in sorted(_pairEnergyResults.keys()):
-         output.write(resultKey + ' ' + str(_pairEnergyResults[resultKey]) + '\n')
-     
-     routines.write(str(count)+' residue combinations tried\n')
---- a/extensions/salt.py
-+++ b/extensions/salt.py
-@@ -57,7 +57,7 @@
-     for cation in protein.getAtoms():
-         # check that we've found a cation
-         if cation.residue.name == "NMET":
--            print "YES NMET"
-+            print("YES NMET")
-         if cation.residue.name not in posresList: 
-             continue
-         elif cation.name not in posatomList: 
---- a/main.py
-+++ b/main.py
-@@ -69,7 +69,7 @@
- from src.server import *
- from src.hydrogens import *
- from src.aconf import *
--from StringIO import *
-+from io import StringIO
- from src.errors import PDB2PQRError
- 
- __version__ = PDB2PQR_VERSION
-@@ -252,11 +252,11 @@
-     start = time.time()
- 
-     if verbose:
--        print "Beginning PDB2PQR...\n"
-+        print("Beginning PDB2PQR...\n")
- 
-     myDefinition = Definition()
-     if verbose:
--        print "Parsed Amino Acid definition file."
-+        print("Parsed Amino Acid definition file.")
- 
-     if drop_water:
-         # Remove the waters
-@@ -281,9 +281,9 @@
-         myProtein = Protein(pdblist, myDefinition)
- 
-     if verbose:
--        print "Created protein object -"
--        print "\tNumber of residues in protein: %s" % myProtein.numResidues()
--        print "\tNumber of atoms in protein   : %s" % myProtein.numAtoms()
-+        print("Created protein object -")
-+        print("\tNumber of residues in protein: %s" % myProtein.numResidues())
-+        print("\tNumber of atoms in protein   : %s" % myProtein.numAtoms())
- 
-     myRoutines = Routines(myProtein, verbose)
- 
-@@ -313,7 +313,7 @@
-             module.run_extension(myRoutines, outroot, extensionOptions)
- 
-         if verbose:
--            print "Total time taken: %.2f seconds\n" % (time.time() - start)
-+            print("Total time taken: %.2f seconds\n" % (time.time() - start))
- 
-         #Be sure to include None for missed ligand residues
-         return header, lines, None
-@@ -450,7 +450,7 @@
- 
- 
-     if verbose:
--        print "Total time taken: %.2f seconds\n" % (time.time() - start)
-+        print("Total time taken: %.2f seconds\n" % (time.time() - start))
- 
-     return header, lines, missedligandresidues
- 
-@@ -695,8 +695,8 @@
-         parser.error("Unable to find file %s!" % path)
- 
-     if len(errlist) != 0 and options.verbose:
--        print "Warning: %s is a non-standard PDB file.\n" % path
--        print errlist
-+        print("Warning: %s is a non-standard PDB file.\n" % path)
-+        print(errlist)
- 
-     outpath = args[1]
-     options.outname = outpath
-@@ -739,7 +739,7 @@
-                                                   commandLine = commandLine,
-                                                   include_old_header = options.include_header)
-     except PDB2PQRError as er:
--        print er
-+        print(er)
-         sys.exit(2)
- 
-     # Print the PQR file
-@@ -765,8 +765,8 @@
-         size = psize.Psize()
-         size.parseInput(outpath)
-         size.runPsize(outpath)
--        async = 0 # No async files here!
--        input = inputgen.Input(outpath, size, method, async, potdx=True)
-+        async_ = 0 # No async files here!
-+        input = inputgen.Input(outpath, size, method, async_, potdx=True)
-         input.printInputFiles()
-         input.dumpPickle()
- 
---- a/main_cgi.py
-+++ b/main_cgi.py
-@@ -605,12 +605,12 @@
-                 if whitespace: 
-                     if line[0:4] == 'ATOM':
-                         newline = line[0:6] + ' ' + line[6:16] + ' ' + line[16:38] + ' ' + line[38:46] + ' ' + line[46:]
--                        pqrfile.write("%s\n" % string.strip(newline))
-+                        pqrfile.write("%s\n" % newline.strip())
-                     elif line[0:6] == 'HETATM':
-                         newline = line[0:6] + ' ' + line[6:16] + ' ' + line[16:38] + ' ' + line[38:46] + ' ' + line[46:]
--                        pqrfile.write("%s\n" % string.strip(newline))
-+                        pqrfile.write("%s\n" % newline.strip())
-                 else: 
--                    pqrfile.write("%s\n" % string.strip(line))
-+                    pqrfile.write("%s\n" % line.strip())
-             pqrfile.close()
-                     
-             if weboptions.otheroptions['apbs']:
-@@ -620,8 +620,8 @@
-                 size = psize.Psize()
-                 size.parseInput(pqrpath)
-                 size.runPsize(pqrpath)
--                async = 0 # No async files here!
--                myinput = inputgen.Input(pqrpath, size, method, async, potdx=True)
-+                async_ = 0 # No async files here!
-+                myinput = inputgen.Input(pqrpath, size, method, async_, potdx=True)
-                 myinput.printInputFiles()
-                 myinput.dumpPickle()
-                         
-@@ -676,4 +676,4 @@
-         handleNonOpal(weboptions)
-         
-     return
--    
-\ No newline at end of file
-+
---- a/pdb2pka/pKa_utility_functions_compat.py
-+++ b/pdb2pka/pKa_utility_functions_compat.py
-@@ -97,7 +97,7 @@
-     #
-     # First trim the string
-     #
--    line=string.join(string.split(string.strip(line))[:-1])
-+    line=string.join(string.split(line.strip())[:-1])
-     #
-     # Now the line looks like: 1 THR ( 1 ) N
-     #
---- a/pdb2pka/pka_old.py
-+++ b/pdb2pka/pka_old.py
-@@ -502,7 +502,6 @@
-     size=src.psize.Psize()
- 
-     method=""
--    async=0
-     split=0
-     import inputgen_pKa
-     igen = inputgen_pKa.inputGen(pdbfilename)
---- a/pdb2pka/pka_routines.py
-+++ b/pdb2pka/pka_routines.py
-@@ -2361,13 +2361,13 @@
-                     titrations.append(thisTitration)
- 
-                     line = titration_file.readline()
--                    if string.strip(line) == 'END': break
-+                    if line.strip() == 'END': break
- 
-                 thisGroup = pKaGroup(name, resname, type, titrations)
-                 mygroups[name] = thisGroup
- 
-                 line = titration_file.readline()
--                if string.strip(line) == 'END OF FILE': break
-+                if line.strip() == 'END OF FILE': break
- 
-         return mygroups
- 
---- a/pdb2pqr.py.in
-+++ b/pdb2pqr.py.in
-@@ -58,7 +58,7 @@
- if __name__ == "__main__":
-     """ Determine if called from command line or CGI """
-     
--    if not os.environ.has_key("REQUEST_METHOD"):
-+    if "REQUEST_METHOD" not in os.environ:
-         mainCommand(sys.argv)
-     else:
-         mainCGI()
---- a/pka.py
-+++ b/pka.py
-@@ -420,7 +420,6 @@
-     size=src.psize.Psize()
- 
-     method=""
--    async=0
-     split=0
- 
-     igen = inputgen_pKa.inputGen(working_pdb_filename)
---- a/querystatus.py
-+++ b/querystatus.py
-@@ -161,7 +161,7 @@
-         file = open('%s%s%s/%s_status' % (INSTALLDIR,TMPDIR,jobid, form["calctype"].value))
- 
-         for line in file.readlines():
--            progress.append(string.strip(line))
-+            progress.append(line.strip())
-         file.close()
-         return progress
- 
---- a/src/aa.py
-+++ b/src/aa.py
-@@ -49,8 +49,8 @@
- __author__ = "Todd Dolinsky"
- 
- import string
--from structures import *
--from src.errors import PDBInputError
-+from .structures import *
-+from .errors import PDBInputError
- 
- class Amino(Residue):
-     """
---- a/src/definitions.py
-+++ b/src/definitions.py
-@@ -54,12 +54,12 @@
- import copy
- import re
- from xml import sax
--from pdb import *
--from utilities import *
--from structures import *
--from routines import *
-+from .pdb import *
-+from .utilities import *
-+from .structures import *
-+from .routines import *
- 
--from errors import PDBInternalError
-+from .errors import PDBInternalError
- 
- class DefinitionHandler(sax.ContentHandler):
-    
-@@ -201,7 +201,7 @@
- 
-                 # Find all residues matching applyto
- 
--                resnames = self.map.keys()
-+                resnames = list(self.map.keys())
-                 for name in resnames:
-                     regexp = re.compile(patch.applyto).match(name)
-                     if not regexp: continue
---- a/src/forcefield.py
-+++ b/src/forcefield.py
-@@ -57,8 +57,8 @@
- import re
- 
- from xml import sax
--from utilities import *
--from errors import PDBInputError, PDBInternalError
-+from .utilities import *
-+from .errors import PDBInputError, PDBInternalError
- 
- class ForcefieldHandler(sax.ContentHandler):
-    
-@@ -233,7 +233,7 @@
-         if userff == None:
-             defpath = getFFfile(ff)
-             if defpath == "":
--                raise PDBInputError, "Unable to find forcefield parameter file %s!" % self.name
-+                raise PDBInputError("Unable to find forcefield parameter file %s!" % self.name)
-           
-             file = open(defpath, 'rU')
- 
-@@ -243,7 +243,7 @@
-         lines = file.readlines()
-         for line in lines:
-             if not line.startswith("#"):
--                fields = string.split(line)
-+                fields = line.split()
-                 if fields == []: continue  
-                 try:
-                     resname = fields[0]
-@@ -776,7 +776,7 @@
-             elif atomname == "C": atomname = "CY"
-             elif atomname == "O": atomname = "OY"
-         elif resname == "ADP":
--            atomname = string.replace(atomname,"*","\'")
-+            atomname = atomname.replace("*","\'")
-         elif resname == "NME":
-             resname = "CT3"
-             if atomname == "HH31": atomname = "HT1"
---- a/src/hydrogens.py
-+++ b/src/hydrogens.py
-@@ -47,11 +47,11 @@
- import string
- import math
- 
--from definitions import *
--from utilities import *
--from quatfit import *
--from routines import *
--import topology
-+from .definitions import *
-+from .utilities import *
-+from .quatfit import *
-+from .routines import *
-+from . import topology
- 
- __date__ = "22 April 2009"
- __author__ = "Todd Dolinsky, Jens Erik Nielsen, Yong Huang"
-@@ -219,7 +219,7 @@
-         """
-             Easy way to turn on/off debugging
-         """
--        if HDEBUG: print txt
-+        if HDEBUG: print(txt)
- 
-     @staticmethod
-     def getHbondangle(atom1, atom2, atom3):
-@@ -1035,7 +1035,7 @@
-         self.atomlist = []
-         self.hbonds = []
- 
--        name = optinstance.map.keys()[0]
-+        name = list(optinstance.map.keys())[0]
-         self.hname = name
-         
-         bondname = residue.reference.getAtom(name).bonds[0]
-@@ -2034,7 +2034,7 @@
-             Parameters
-                 text:  The text to output (string)
-         """
--        if HDEBUG: print text  
-+        if HDEBUG: print(text)  
- 
-     def switchstate(self, states, amb, stateID):
-         """
-@@ -2069,7 +2069,7 @@
-             hname = conf.hname
-             boundname = conf.boundatom
-             if residue.getAtom(hname) != None:
--                print 'Removing',residue.name,residue.resSeq,hname
-+                print('Removing',residue.name,residue.resSeq,hname)
-                 residue.removeAtom(hname)
-             residue.getAtom(boundname).hacceptor = 1
-             residue.getAtom(boundname).hdonor = 0
-@@ -2088,7 +2088,7 @@
-         # Now build appropriate atoms
-         state = states[stateID]
-         for conf in state:
--            print conf
-+            print(conf)
-             refcoords = []
-             defcoords = []
-             defatomcoords = []
-@@ -2274,7 +2274,7 @@
- 
-         if optinstance != None:
-             if optinstance.opttype == "Alcoholic":
--                atomname = optinstance.map.keys()[0]
-+                atomname = list(optinstance.map.keys())[0]
-                 if not residue.reference.hasAtom(atomname):
-                     optinstance = None
-                    
-@@ -2736,7 +2736,7 @@
-             refatoms = ['OE1', 'CD', 'OE2']
-         else:
-             patchmap = self.routines.protein.patchmap[name]
--            atoms = patchmap.map.keys()
-+            atoms = list(patchmap.map.keys())
-             atoms.sort()
- 
-         if name in ['NTR']:
---- a/src/inputgen.py
-+++ b/src/inputgen.py
-@@ -64,10 +64,10 @@
- __author__ = "Todd Dolinsky, Nathan Baker, Yong Huang"
- 
- import string, sys
--import psize
-+from . import psize
- import pickle
- import os.path
--import utilities
-+from . import utilities
- 
- class Elec:
-     """
-@@ -102,7 +102,7 @@
-         self.label = ""
-         self.nlev = 4
-         self.ofrac = 0.1
--        self.async = 0
-+        self.async_ = 0
-         self.asyncflag = asyncflag
-         self.cgcent = "mol 1"
-         self.fgcent = "mol 1"
-@@ -127,6 +127,13 @@
-             self.write = [["pot", "dx", pqrpath]]
-         else:
-             self.write = [["pot", "dx", "pot"]] # Multiple write statements possible
-+
-+    def __getattr__(self, name):
-+        # BACKWARDS COMPATIBILITY
-+        if name == 'async':
-+            print('Warning: async renamed to async_ (reserved keyword)')
-+            return self.async_
-+        raise AttributeError(name)
-     
-     def __str__(self):
-         """
-@@ -152,7 +159,7 @@
-             text += "    cgcent %s\n" % self.cgcent
-             text += "    fgcent %s\n" % self.fgcent
-             if self.asyncflag == 1:
--                text += "    async %i\n" % self.async
-+                text += "    async %i\n" % self.async_
-         text += "    mol %i\n" % self.mol
-         if self.lpbe: text += "    lpbe\n"
-         else: text += "    npbe\n"
-@@ -261,7 +268,7 @@
-                 outname = base_pqr_name + "-PE%i.in" % i
-                 for elec in self.elecs:
-                     elec.asyncflag = 1
--                    elec.async = i
-+                    elec.async_ = i
-                 file = open(outname, "w")
-                 file.write(str(self))
-                 file.close()
-@@ -278,7 +285,7 @@
-         """
-         base_pqr_name = utilities.getPQRBaseFileName(self.pqrpath)
-         outname = base_pqr_name + "-input.p"
--        pfile = open(outname, "w")
-+        pfile = open(outname, "wb")
-         pickle.dump(self, pfile)
-         pfile.close()
-         
-@@ -298,9 +305,9 @@
-         line = file.readline()
-         if line == "": break
-         text += line
--        line = string.strip(line)
-+        line = line.strip()
-         if line.startswith("pdime"): # Get # Procs
--            words = string.split(line)
-+            words = line.split()
-             nproc = int(words[1]) * int(words[2]) * int(words[3])
- 
-     if nproc == 0:
-@@ -311,7 +318,7 @@
-     base_pqr_name = utilities.getPQRBaseFileName(filename)
-     for i in range(nproc):
-         outname = base_pqr_name + "-PE%i.in" % i
--        outtext = string.replace(text, "mg-para\n","mg-para\n    async %i\n" % i)
-+        outtext = text.replace("mg-para\n","mg-para\n    async %i\n" % i)
-         outfile = open(outname, "w")
-         outfile.write(outtext)
-         outfile.close()
-@@ -368,7 +375,7 @@
- 
-     try:
-         opts, args = getopt.getopt(sys.argv[1:], shortOptList, longOptList)
--    except getopt.GetoptError, details:
-+    except getopt.GetoptError as details:
-         sys.stderr.write("Option error (%s)!\n" % details)
-         usage()
-         
-@@ -380,7 +387,7 @@
- 
-     method = ""
-     size = psize.Psize()
--    async = 0
-+    async_ = 0
-     split = 0
-     istrng = 0
-     potdx = 0
-@@ -400,7 +407,7 @@
-             elif a == "async":
-                 sys.stdout.write("Forcing an asynchronous calculation\n")
-                 method = "mg-para"
--                async = 1
-+                async_ = 1
-             elif a == "manual":
-                 sys.stdout.write("Forcing a manual calculation\n")
-                 method = "mg-manual"
-@@ -426,7 +433,7 @@
-         splitInput(filename)
-     else:
-         size.runPsize(filename)
--        input = Input(filename, size, method, async, istrng, potdx)
-+        input = Input(filename, size, method, async_, istrng, potdx)
-         input.printInputFiles()
- 
- if __name__ == "__main__": main()
---- a/src/na.py
-+++ b/src/na.py
-@@ -49,7 +49,7 @@
- __author__ = "Todd Dolinsky"
- 
- import string
--from structures import *
-+from .structures import *
- 
- class Nucleic(Residue):
-     """
---- a/src/pdb.py
-+++ b/src/pdb.py
-@@ -50,7 +50,7 @@
- 
- import string, sys
- import copy  ### PC
--from errors import PDBInputError, PDBInternalError
-+from .errors import PDBInputError, PDBInternalError
- 
- lineParsers = {}
- 
-@@ -64,9 +64,9 @@
-     Verifies the received record type
-     """
-     def __init__(self, line):
--        record = string.strip(line[0:6])
-+        record = str.strip(line[0:6])
-         if record != self.__class__.__name__:
--            raise ValueError, record
-+            raise ValueError(record)
- 
-         self.original_text = line.rstrip('\r\n')
- 
-@@ -117,17 +117,17 @@
-             66-70    int    numSeq    Number of SEQRES records
-         """
-         super(MASTER, self).__init__(line)
--        self.numRemark = int(string.strip(line[10:15]))
--        self.numHet = int(string.strip(line[20:25]))
--        self.numHelix = int(string.strip(line[25:30]))
--        self.numSheet = int(string.strip(line[30:35]))
--        self.numTurn = int(string.strip(line[35:40]))
--        self.numSite = int(string.strip(line[40:45]))
--        self.numXform = int(string.strip(line[45:50]))
--        self.numCoord = int(string.strip(line[50:55]))
--        self.numTer = int(string.strip(line[55:60]))
--        self.numConect = int(string.strip(line[60:65]))
--        self.numSeq = int(string.strip(line[65:70]))
-+        self.numRemark = int(str.strip(line[10:15]))
-+        self.numHet = int(str.strip(line[20:25]))
-+        self.numHelix = int(str.strip(line[25:30]))
-+        self.numSheet = int(str.strip(line[30:35]))
-+        self.numTurn = int(str.strip(line[35:40]))
-+        self.numSite = int(str.strip(line[40:45]))
-+        self.numXform = int(str.strip(line[45:50]))
-+        self.numCoord = int(str.strip(line[50:55]))
-+        self.numTer = int(str.strip(line[55:60]))
-+        self.numConect = int(str.strip(line[60:65]))
-+        self.numSeq = int(str.strip(line[65:70]))
- 
- 
- @RegisterLineParser
-@@ -162,26 +162,26 @@
-             57-61    int    serial10 Serial number of salt bridged    atom
-         """
-         super(CONECT, self).__init__(line)
--        self.serial = int(string.strip(line[6:11]))
--        try:  self.serial1 = int(string.strip(line[11:16]))
-+        self.serial = int(str.strip(line[6:11]))
-+        try:  self.serial1 = int(str.strip(line[11:16]))
-         except ValueError:  self.serial1 = None
--        try:  self.serial2 = int(string.strip(line[16:21]))
-+        try:  self.serial2 = int(str.strip(line[16:21]))
-         except ValueError:  self.serial2 = None
--        try:  self.serial3 = int(string.strip(line[21:26]))
-+        try:  self.serial3 = int(str.strip(line[21:26]))
-         except ValueError:  self.serial3 = None
--        try:  self.serial4 = int(string.strip(line[26:31]))
-+        try:  self.serial4 = int(str.strip(line[26:31]))
-         except ValueError:  self.serial4 = None
--        try:  self.serial5 = int(string.strip(line[31:36]))
-+        try:  self.serial5 = int(str.strip(line[31:36]))
-         except ValueError:  self.serial5 = None
--        try:  self.serial6 = int(string.strip(line[36:41]))
-+        try:  self.serial6 = int(str.strip(line[36:41]))
-         except ValueError:  self.serial6 = None
--        try:  self.serial7 = int(string.strip(line[41:46]))
-+        try:  self.serial7 = int(str.strip(line[41:46]))
-         except ValueError:  self.serial7 = None
--        try:  self.serial8 = int(string.strip(line[46:51]))
-+        try:  self.serial8 = int(str.strip(line[46:51]))
-         except ValueError:  self.serial8 = None
--        try:  self.serial9 = int(string.strip(line[51:56]))
-+        try:  self.serial9 = int(str.strip(line[51:56]))
-         except ValueError:  self.serial9 = None
--        try:  self.serial10 = int(string.strip(line[56:61]))
-+        try:  self.serial10 = int(str.strip(line[56:61]))
-         except ValueError:  self.serial10 = None
- 
- @RegisterLineParser
-@@ -201,7 +201,7 @@
-         """
-         super(NUMMDL, self).__init__(line)
-         try:
--            self.modelNumber = int(string.strip(line[10:14]))
-+            self.modelNumber = int(str.strip(line[10:14]))
-         except ValueError:
-             self.modelNumber = None
- 
-@@ -240,11 +240,11 @@
-         """
-         super(TER, self).__init__(line)
-         try: # Not really needed
--            self.serial = int(string.strip(line[6:11]))
--            self.resName = string.strip(line[17:20])
--            self.chainID = string.strip(line[21])
--            self.resSeq = int(string.strip(line[22:26]))
--            self.iCode = string.strip(line[26])
-+            self.serial = int(str.strip(line[6:11]))
-+            self.resName = str.strip(line[17:20])
-+            self.chainID = str.strip(line[21])
-+            self.resSeq = int(str.strip(line[22:26]))
-+            self.iCode = str.strip(line[26])
-         except (IndexError, ValueError):
-             self.serial = None
-             self.resName = None
-@@ -284,22 +284,22 @@
-         """
-         super(SIGUIJ, self).__init__(line)
- 
--        self.serial = int(string.strip(line[6:11]))
--        self.name = string.strip(line[12:16])
--        self.altLoc = string.strip(line[16])
--        self.resName = string.strip(line[17:20])
--        self.chainID = string.strip(line[21])
--        self.resSeq = int(string.strip(line[22:26]))
--        self.iCode = string.strip(line[26])
--        self.sig11 = int(string.strip(line[28:35]))
--        self.sig22 = int(string.strip(line[35:42]))
--        self.sig33 = int(string.strip(line[42:49]))
--        self.sig12 = int(string.strip(line[49:56]))
--        self.sig13 = int(string.strip(line[56:63]))
--        self.sig23 = int(string.strip(line[63:70]))
--        self.segID = string.strip(line[72:76])
--        self.element = string.strip(line[76:78])
--        self.charge = string.strip(line[78:80])
-+        self.serial = int(str.strip(line[6:11]))
-+        self.name = str.strip(line[12:16])
-+        self.altLoc = str.strip(line[16])
-+        self.resName = str.strip(line[17:20])
-+        self.chainID = str.strip(line[21])
-+        self.resSeq = int(str.strip(line[22:26]))
-+        self.iCode = str.strip(line[26])
-+        self.sig11 = int(str.strip(line[28:35]))
-+        self.sig22 = int(str.strip(line[35:42]))
-+        self.sig33 = int(str.strip(line[42:49]))
-+        self.sig12 = int(str.strip(line[49:56]))
-+        self.sig13 = int(str.strip(line[56:63]))
-+        self.sig23 = int(str.strip(line[63:70]))
-+        self.segID = str.strip(line[72:76])
-+        self.element = str.strip(line[76:78])
-+        self.charge = str.strip(line[78:80])
- 
- 
- @RegisterLineParser
-@@ -333,22 +333,22 @@
-               79-80    string charge  Charge on the atom.
-         """
-         super(ANISOU, self).__init__(line)
--        self.serial = int(string.strip(line[6:11]))
--        self.name = string.strip(line[12:16])
--        self.altLoc = string.strip(line[16])
--        self.resName = string.strip(line[17:20])
--        self.chainID = string.strip(line[21])
--        self.resSeq = int(string.strip(line[22:26]))
--        self.iCode = string.strip(line[26])
--        self.u00 = int(string.strip(line[28:35]))
--        self.u11 = int(string.strip(line[35:42]))
--        self.u22 = int(string.strip(line[42:49]))
--        self.u01 = int(string.strip(line[49:56]))
--        self.u02 = int(string.strip(line[56:63]))
--        self.u12 = int(string.strip(line[63:70]))
--        self.segID = string.strip(line[72:76])
--        self.element = string.strip(line[76:78])
--        self.charge = string.strip(line[78:80])
-+        self.serial = int(str.strip(line[6:11]))
-+        self.name = str.strip(line[12:16])
-+        self.altLoc = str.strip(line[16])
-+        self.resName = str.strip(line[17:20])
-+        self.chainID = str.strip(line[21])
-+        self.resSeq = int(str.strip(line[22:26]))
-+        self.iCode = str.strip(line[26])
-+        self.u00 = int(str.strip(line[28:35]))
-+        self.u11 = int(str.strip(line[35:42]))
-+        self.u22 = int(str.strip(line[42:49]))
-+        self.u01 = int(str.strip(line[49:56]))
-+        self.u02 = int(str.strip(line[56:63]))
-+        self.u12 = int(str.strip(line[63:70]))
-+        self.segID = str.strip(line[72:76])
-+        self.element = str.strip(line[76:78])
-+        self.charge = str.strip(line[78:80])
- 
- @RegisterLineParser
- class SIGATM(BaseRecord):
-@@ -384,21 +384,21 @@
-             79-80     string charge  Charge on the atom.
-         """
-         super(SIGATM, self).__init__(line)
--        self.serial = int(string.strip(line[6:11]))
--        self.name = string.strip(line[12:16])
--        self.altLoc = string.strip(line[16])
--        self.resName = string.strip(line[17:20])
--        self.chainID = string.strip(line[21])
--        self.resSeq = int(string.strip(line[22:26]))
--        self.iCode = string.strip(line[26])
--        self.sigX = float(string.strip(line[30:38]))
--        self.sigY = float(string.strip(line[38:46]))
--        self.sigZ = float(string.strip(line[46:54]))
--        self.sigOcc = float(string.strip(line[54:60]))
--        self.sigTemp = float(string.strip(line[60:66]))
--        self.segID = string.strip(line[72:76])
--        self.element = string.strip(line[76:78])
--        self.charge = string.strip(line[78:80])
-+        self.serial = int(str.strip(line[6:11]))
-+        self.name = str.strip(line[12:16])
-+        self.altLoc = str.strip(line[16])
-+        self.resName = str.strip(line[17:20])
-+        self.chainID = str.strip(line[21])
-+        self.resSeq = int(str.strip(line[22:26]))
-+        self.iCode = str.strip(line[26])
-+        self.sigX = float(str.strip(line[30:38]))
-+        self.sigY = float(str.strip(line[38:46]))
-+        self.sigZ = float(str.strip(line[46:54]))
-+        self.sigOcc = float(str.strip(line[54:60]))
-+        self.sigTemp = float(str.strip(line[60:66]))
-+        self.segID = str.strip(line[72:76])
-+        self.element = str.strip(line[76:78])
-+        self.charge = str.strip(line[78:80])
- 
- @RegisterLineParser
- class HETATM(BaseRecord):
-@@ -435,19 +435,19 @@
-             79-80     string charge        Charge on the atom.
-         """
-         super(HETATM, self).__init__(line)
--        self.serial = int(string.strip(line[6:11]))
--        self.name = string.strip(line[12:16])
--        self.altLoc = string.strip(line[16])
-+        self.serial = int(str.strip(line[6:11]))
-+        self.name = str.strip(line[12:16])
-+        self.altLoc = str.strip(line[16])
-         try:
--            self.resName = string.strip(line[17:20])
--            self.chainID = string.strip(line[21])
--            self.resSeq = int(string.strip(line[22:26]))
--            self.iCode = string.strip(line[26])
-+            self.resName = str.strip(line[17:20])
-+            self.chainID = str.strip(line[21])
-+            self.resSeq = int(str.strip(line[22:26]))
-+            self.iCode = str.strip(line[26])
-         except:
--            raise ValueError, 'Residue name must be less than 4 characters!'
--        self.x = float(string.strip(line[30:38]))
--        self.y = float(string.strip(line[38:46]))
--        self.z = float(string.strip(line[46:54]))
-+            raise ValueError('Residue name must be less than 4 characters!')
-+        self.x = float(str.strip(line[30:38]))
-+        self.y = float(str.strip(line[38:46]))
-+        self.z = float(str.strip(line[46:54]))
-         ### PC
- #            self.lAtoms = lAtoms
-         self.sybylType = sybylType
-@@ -458,11 +458,11 @@
-         self.isNterm=0
-         ###
-         try:
--            self.occupancy = float(string.strip(line[54:60]))
--            self.tempFactor = float(string.strip(line[60:66]))
--            self.segID = string.strip(line[72:76])
--            self.element = string.strip(line[76:78])
--            self.charge = string.strip(line[78:80])
-+            self.occupancy = float(str.strip(line[54:60]))
-+            self.tempFactor = float(str.strip(line[60:66]))
-+            self.segID = str.strip(line[72:76])
-+            self.element = str.strip(line[76:78])
-+            self.charge = str.strip(line[78:80])
-         except (ValueError, IndexError):
-             self.occupancy = 0.00
-             self.tempFactor = 0.00
-@@ -497,43 +497,43 @@
- #         """
- #         str = ""
- #         tstr = "HETATM"
--#         str = str + string.ljust(tstr, 6)[:6]
-+#         str = str + str.ljust(tstr, 6)[:6]
- #         tstr = "%d" % self.serial
--#         str = str + string.rjust(tstr, 5)[:5]
-+#         str = str + str.rjust(tstr, 5)[:5]
- #         str = str + " "
- #         tstr = self.name
- #         if len(tstr) == 4:
--#             str = str + string.ljust(tstr, 4)[:4]
-+#             str = str + str.ljust(tstr, 4)[:4]
- #         else:
--#             str = str + " " + string.ljust(tstr, 3)[:3]
-+#             str = str + " " + str.ljust(tstr, 3)[:3]
- #         tstr = self.altLoc
--#         str = str + string.ljust(tstr, 1)[:1]
-+#         str = str + str.ljust(tstr, 1)[:1]
- #         tstr = self.resName
--#         str = str + string.ljust(tstr, 3)[:3]
-+#         str = str + str.ljust(tstr, 3)[:3]
- #         str = str + " "
- #         tstr = self.chainID
--#         str = str + string.ljust(tstr, 1)[:1]
-+#         str = str + str.ljust(tstr, 1)[:1]
- #         tstr = "%d" % self.resSeq
--#         str = str + string.rjust(tstr, 4)[:4]
-+#         str = str + str.rjust(tstr, 4)[:4]
- #         tstr = self.iCode
--#         str = str + string.ljust(tstr, 1)[:1]
-+#         str = str + str.ljust(tstr, 1)[:1]
- #         str = str + "   "
- #         tstr = "%8.3f" % self.x
--#         str = str + string.ljust(tstr, 8)[:8]
-+#         str = str + str.ljust(tstr, 8)[:8]
- #         tstr = "%8.3f" % self.y
--#         str = str + string.ljust(tstr, 8)[:8]
-+#         str = str + str.ljust(tstr, 8)[:8]
- #         tstr = "%8.3f" % self.z
--#         str = str + string.ljust(tstr, 8)[:8]
-+#         str = str + str.ljust(tstr, 8)[:8]
- #         tstr = "%6.2f" % self.occupancy
--#         str = str + string.ljust(tstr, 6)[:6]
-+#         str = str + str.ljust(tstr, 6)[:6]
- #         tstr = "%6.2f" % self.tempFactor
--#         str = str + string.rjust(tstr, 6)[:6]
-+#         str = str + str.rjust(tstr, 6)[:6]
- #         tstr = self.segID
--#         str = str + string.ljust(tstr, 4)[:4]
-+#         str = str + str.ljust(tstr, 4)[:4]
- #         tstr = self.element
--#         str = str + string.ljust(tstr, 2)[:2]
-+#         str = str + str.ljust(tstr, 2)[:2]
- #         tstr = self.charge
--#         str = str + string.ljust(tstr, 2)[:2]
-+#         str = str + str.ljust(tstr, 2)[:2]
- #         return str
- 
- ### PC
-@@ -632,7 +632,7 @@
-                 try:
-                     thisAtom.mol2charge=float(charge)
-                 except:
--                    print 'Warning. Non-float charge in mol2 file.',charge
-+                    print('Warning. Non-float charge in mol2 file.',charge)
-                     thisAtom.mol2charge=None
-             self.lPDBAtoms.append(mol2pdb)
-             self.lAtoms.append(thisAtom)
-@@ -727,22 +727,22 @@
-             79-80     string charge        Charge on the atom.
-         """
-         super(ATOM, self).__init__(line)
--        self.serial = int(string.strip(line[6:11]))
--        self.name = string.strip(line[12:16])
--        self.altLoc = string.strip(line[16])
--        self.resName = string.strip(line[17:20])
--        self.chainID = string.strip(line[21])
--        self.resSeq = int(string.strip(line[22:26]))
--        self.iCode = string.strip(line[26])
--        self.x = float(string.strip(line[30:38]))
--        self.y = float(string.strip(line[38:46]))
--        self.z = float(string.strip(line[46:54]))
-+        self.serial = int(str.strip(line[6:11]))
-+        self.name = str.strip(line[12:16])
-+        self.altLoc = str.strip(line[16])
-+        self.resName = str.strip(line[17:20])
-+        self.chainID = str.strip(line[21])
-+        self.resSeq = int(str.strip(line[22:26]))
-+        self.iCode = str.strip(line[26])
-+        self.x = float(str.strip(line[30:38]))
-+        self.y = float(str.strip(line[38:46]))
-+        self.z = float(str.strip(line[46:54]))
-         try:
--            self.occupancy = float(string.strip(line[54:60]))
--            self.tempFactor = float(string.strip(line[60:66]))
--            self.segID = string.strip(line[72:76])
--            self.element = string.strip(line[76:78])
--            self.charge = string.strip(line[78:80])
-+            self.occupancy = float(str.strip(line[54:60]))
-+            self.tempFactor = float(str.strip(line[60:66]))
-+            self.segID = str.strip(line[72:76])
-+            self.element = str.strip(line[76:78])
-+            self.charge = str.strip(line[78:80])
-         except (ValueError, IndexError):
-             self.occupancy = 0.00
-             self.tempFactor = 0.00
-@@ -777,43 +777,43 @@
- #         """
- #         str = ""
- #         tstr = "ATOM"
--#         str = str + string.ljust(tstr, 6)[:6]
-+#         str = str + str.ljust(tstr, 6)[:6]
- #         tstr = "%d" % self.serial
--#         str = str + string.rjust(tstr, 5)[:5]
-+#         str = str + str.rjust(tstr, 5)[:5]
- #         str = str + " "
- #         tstr = self.name
- #         if len(tstr) == 4:
--#             str = str + string.ljust(tstr, 4)[:4]
-+#             str = str + str.ljust(tstr, 4)[:4]
- #         else:
--#             str = str + " " + string.ljust(tstr, 3)[:3]
-+#             str = str + " " + str.ljust(tstr, 3)[:3]
- #         tstr = self.altLoc
--#         str = str + string.ljust(tstr, 1)[:1]
-+#         str = str + str.ljust(tstr, 1)[:1]
- #         tstr = self.resName
--#         str = str + string.ljust(tstr, 3)[:3]
-+#         str = str + str.ljust(tstr, 3)[:3]
- #         str = str + " "
- #         tstr = self.chainID
--#         str = str + string.ljust(tstr, 1)[:1]
-+#         str = str + str.ljust(tstr, 1)[:1]
- #         tstr = "%d" % self.resSeq
--#         str = str + string.rjust(tstr, 4)[:4]
-+#         str = str + str.rjust(tstr, 4)[:4]
- #         tstr = self.iCode
--#         str = str + string.ljust(tstr, 1)[:1]
-+#         str = str + str.ljust(tstr, 1)[:1]
- #         str = str + "   "
- #         tstr = "%8.3f" % self.x
--#         str = str + string.ljust(tstr, 8)[:8]
-+#         str = str + str.ljust(tstr, 8)[:8]
- #         tstr = "%8.3f" % self.y
--#         str = str + string.ljust(tstr, 8)[:8]
-+#         str = str + str.ljust(tstr, 8)[:8]
- #         tstr = "%8.3f" % self.z
--#         str = str + string.ljust(tstr, 8)[:8]
-+#         str = str + str.ljust(tstr, 8)[:8]
- #         tstr = "%6.2f" % self.occupancy
--#         str = str + string.ljust(tstr, 6)[:6]
-+#         str = str + str.ljust(tstr, 6)[:6]
- #         tstr = "%6.2f" % self.tempFactor
--#         str = str + string.ljust(tstr, 6)[:6]
-+#         str = str + str.ljust(tstr, 6)[:6]
- #         tstr = self.segID
--#         str = str + string.ljust(tstr, 4)[:4]
-+#         str = str + str.ljust(tstr, 4)[:4]
- #         tstr = self.element
--#         str = str + string.ljust(tstr, 2)[:2]
-+#         str = str + str.ljust(tstr, 2)[:2]
- #         tstr = self.charge
--#         str = str + string.ljust(tstr, 2)[:2]
-+#         str = str + str.ljust(tstr, 2)[:2]
- #         return str
- 
- @RegisterLineParser
-@@ -834,7 +834,7 @@
-            11-14    int    serial Model serial number.
-         """
-         super(MODEL, self).__init__(line)
--        self.serial = int(string.strip(line[10:14]))
-+        self.serial = int(str.strip(line[10:14]))
- 
- @RegisterLineParser
- class TVECT(BaseRecord):
-@@ -857,11 +857,11 @@
-             41-70    string text   Comments
-         """
-         super(TVECT, self).__init__(line)
--        self.serial = int(string.strip(line[7:10]))
--        self.t1 = float(string.strip(line[10:20]))
--        self.t2 = float(string.strip(line[20:30]))
--        self.t3 = float(string.strip(line[30:40]))
--        self.text = string.strip(line[40:70])
-+        self.serial = int(str.strip(line[7:10]))
-+        self.t1 = float(str.strip(line[10:20]))
-+        self.t2 = float(str.strip(line[20:30]))
-+        self.t3 = float(str.strip(line[30:40]))
-+        self.text = str.strip(line[40:70])
- 
- 
- class MTRIXn(BaseRecord):
-@@ -888,13 +888,13 @@
-                             the entry.  Otherwise, blank.
-         """
-         super(MTRIXn, self).__init__(line)
--        self.serial = int(string.strip(line[7:10]))
--        self.mn1 = float(string.strip(line[10:20]))
--        self.mn2 = float(string.strip(line[20:30]))
--        self.mn3 = float(string.strip(line[30:40]))
--        self.vn = float(string.strip(line[45:55]))
-+        self.serial = int(str.strip(line[7:10]))
-+        self.mn1 = float(str.strip(line[10:20]))
-+        self.mn2 = float(str.strip(line[20:30]))
-+        self.mn3 = float(str.strip(line[30:40]))
-+        self.vn = float(str.strip(line[45:55]))
-         try:
--            self.iGiven = int(string.strip(line[59]))
-+            self.iGiven = int(str.strip(line[59]))
-         except (ValueError, IndexError):
-             self.iGiven = None
- 
-@@ -931,10 +931,10 @@
-             46-55    float  un     U3
-         """
-         super(SCALEn, self).__init__(line)
--        self.sn1 = float(string.strip(line[10:20]))
--        self.sn2 = float(string.strip(line[20:30]))
--        self.sn3 = float(string.strip(line[30:40]))
--        self.un = float(string.strip(line[45:55]))
-+        self.sn1 = float(str.strip(line[10:20]))
-+        self.sn2 = float(str.strip(line[20:30]))
-+        self.sn3 = float(str.strip(line[30:40]))
-+        self.un = float(str.strip(line[45:55]))
- 
- @RegisterLineParser
- class SCALE3(SCALEn):
-@@ -968,10 +968,10 @@
-             46-55    float  tn     T2
-         """
-         super(ORIGXn, self).__init__(line)
--        self.on1 = float(string.strip(line[10:20]))
--        self.on2 = float(string.strip(line[20:30]))
--        self.on3 = float(string.strip(line[30:40]))
--        self.tn = float(string.strip(line[45:55]))
-+        self.on1 = float(str.strip(line[10:20]))
-+        self.on2 = float(str.strip(line[20:30]))
-+        self.on3 = float(str.strip(line[30:40]))
-+        self.tn = float(str.strip(line[45:55]))
- 
- @RegisterLineParser
- class ORIGX2(ORIGXn):
-@@ -1010,14 +1010,14 @@
-            67-70    int    z      Z value.
-         """
-         super(CRYST1, self).__init__(line)
--        self.a = float(string.strip(line[6:15]))
--        self.b = float(string.strip(line[15:24]))
--        self.c = float(string.strip(line[24:33]))
--        self.alpha = float(string.strip(line[33:40]))
--        self.beta = float(string.strip(line[40:47]))
--        self.gamma = float(string.strip(line[47:54]))
--        self.sGroup = string.strip(line[55:65])
--        self.z = int(string.strip(line[66:70]))
-+        self.a = float(str.strip(line[6:15]))
-+        self.b = float(str.strip(line[15:24]))
-+        self.c = float(str.strip(line[24:33]))
-+        self.alpha = float(str.strip(line[33:40]))
-+        self.beta = float(str.strip(line[40:47]))
-+        self.gamma = float(str.strip(line[47:54]))
-+        self.sGroup = str.strip(line[55:65])
-+        self.z = int(str.strip(line[66:70]))
- 
- 
- @RegisterLineParser
-@@ -1071,26 +1071,26 @@
-                                      comprising site.
-         """
-         super(SITE, self).__init__(line)
--        self.seqNum = int(string.strip(line[7:10]))
--        self.siteID = string.strip(line[11:14])
--        self.numRes = int(string.strip(line[15:17]))
--        self.resName1 = string.strip(line[18:21])
--        self.chainID1 = string.strip(line[22])
--        self.seq1 = int(string.strip(line[23:27]))
--        self.iCode1 = string.strip(line[27])
--        self.resName2 = string.strip(line[29:32])
--        self.chainID2 = string.strip(line[33])
--        self.seq2 = int(string.strip(line[34:38]))
--        self.iCode2 = string.strip(line[38])
--        self.resName3 = string.strip(line[40:43])
--        self.chainID3 = string.strip(line[44])
--        self.seq3 = int(string.strip(line[45:49]))
--        self.iCode3 = string.strip(line[49])
--        self.resName4 = string.strip(line[51:54])
--        self.chainID4 = string.strip(line[55])
--        self.seq4 = int(string.strip(line[56:60]))
-+        self.seqNum = int(str.strip(line[7:10]))
-+        self.siteID = str.strip(line[11:14])
-+        self.numRes = int(str.strip(line[15:17]))
-+        self.resName1 = str.strip(line[18:21])
-+        self.chainID1 = str.strip(line[22])
-+        self.seq1 = int(str.strip(line[23:27]))
-+        self.iCode1 = str.strip(line[27])
-+        self.resName2 = str.strip(line[29:32])
-+        self.chainID2 = str.strip(line[33])
-+        self.seq2 = int(str.strip(line[34:38]))
-+        self.iCode2 = str.strip(line[38])
-+        self.resName3 = str.strip(line[40:43])
-+        self.chainID3 = str.strip(line[44])
-+        self.seq3 = int(str.strip(line[45:49]))
-+        self.iCode3 = str.strip(line[49])
-+        self.resName4 = str.strip(line[51:54])
-+        self.chainID4 = str.strip(line[55])
-+        self.seq4 = int(str.strip(line[56:60]))
-         try:
--            self.iCode4 = string.strip(line[60])
-+            self.iCode4 = str.strip(line[60])
-         except IndexError:
-             self.iCode4 = None
- 
-@@ -1122,17 +1122,17 @@
-             54-59    float  measure  Measure of the angle in degrees.
-         """
-         super(CISPEP, self).__init__(line)
--        self.serNum = int(string.strip(line[7:10]))
--        self.pep1 = string.strip(line[11:14])
--        self.chainID1 = string.strip(line[15])
--        self.seqNum1 = int(string.strip(line[17:21]))
--        self.icode1 = string.strip(line[21])
--        self.pep2 = string.strip(line[25:28])
--        self.chainID2 = string.strip(line[29])
--        self.seqNum2 = int(string.strip(line[31:35]))
--        self.icode2 = string.strip(line[35])
--        self.modNum = int(string.strip(line[43:46]))
--        self.measure = float(string.strip(line[53:59]))
-+        self.serNum = int(str.strip(line[7:10]))
-+        self.pep1 = str.strip(line[11:14])
-+        self.chainID1 = str.strip(line[15])
-+        self.seqNum1 = int(str.strip(line[17:21]))
-+        self.icode1 = str.strip(line[21])
-+        self.pep2 = str.strip(line[25:28])
-+        self.chainID2 = str.strip(line[29])
-+        self.seqNum2 = int(str.strip(line[31:35]))
-+        self.icode2 = str.strip(line[35])
-+        self.modNum = int(str.strip(line[43:46]))
-+        self.measure = float(str.strip(line[53:59]))
- 
- @RegisterLineParser
- class SLTBRG(BaseRecord):
-@@ -1164,20 +1164,20 @@
-             67-72    string sym2      Symmetry operator for 2nd atom.
-         """
-         super(SLTBRG, self).__init__(line)
--        self.name1 = string.strip(line[12:16])
--        self.altLoc1 = string.strip(line[16])
--        self.resName1 = string.strip(line[17:20])
--        self.chainID1 = string.strip(line[21])
--        self.resSeq1 = int(string.strip(line[22:26]))
--        self.iCode1 = string.strip(line[26])
--        self.name2 = string.strip(line[42:46])
--        self.altLoc2 = string.strip(line[46])
--        self.resName2 = string.strip(line[47:50])
--        self.chainID2 = string.strip(line[51])
--        self.resSeq2 = int(string.strip(line[52:56]))
--        self.iCode2 = string.strip(line[56])
--        self.sym1 = string.strip(line[59:65])
--        self.sym2 = string.strip(line[66:72])
-+        self.name1 = str.strip(line[12:16])
-+        self.altLoc1 = str.strip(line[16])
-+        self.resName1 = str.strip(line[17:20])
-+        self.chainID1 = str.strip(line[21])
-+        self.resSeq1 = int(str.strip(line[22:26]))
-+        self.iCode1 = str.strip(line[26])
-+        self.name2 = str.strip(line[42:46])
-+        self.altLoc2 = str.strip(line[46])
-+        self.resName2 = str.strip(line[47:50])
-+        self.chainID2 = str.strip(line[51])
-+        self.resSeq2 = int(str.strip(line[52:56]))
-+        self.iCode2 = str.strip(line[56])
-+        self.sym1 = str.strip(line[59:65])
-+        self.sym2 = str.strip(line[66:72])
- 
- @RegisterLineParser
- class HYDBND(BaseRecord):
-@@ -1215,25 +1215,25 @@
-                                               non-hydrogen atom.
-         """
-         super(HYDBND, self).__init__(line)
--        self.name1 = string.strip(line[12:16])
--        self.altLoc1 = string.strip(line[16])
--        self.resName1 = string.strip(line[17:20])
--        self.Chain1 = string.strip(line[21])
--        self.resSeq1 = string.strip(line[22:27])
--        self.ICode1 = string.strip(line[27])
--        self.nameH = string.strip(line[29:33])
--        self.altLocH = string.strip(line[33])
--        self.ChainH = string.strip(line[35])
--        self.resSeqH = string.strip(line[36:41])
--        self.ICodeH = string.strip(line[41])
--        self.name2 = string.strip(line[43:47])
--        self.altLoc2 = string.strip(line[47])
--        self.resName2 = string.strip(line[48:51])
--        self.Chain2 = string.strip(line[52])
--        self.resSeq2 = string.strip(line[53:58])
--        self.ICode2 = string.strip(line[58])
--        self.sym1 = string.strip(line[59:65])
--        self.sym2 = string.strip(line[66:72])
-+        self.name1 = str.strip(line[12:16])
-+        self.altLoc1 = str.strip(line[16])
-+        self.resName1 = str.strip(line[17:20])
-+        self.Chain1 = str.strip(line[21])
-+        self.resSeq1 = str.strip(line[22:27])
-+        self.ICode1 = str.strip(line[27])
-+        self.nameH = str.strip(line[29:33])
-+        self.altLocH = str.strip(line[33])
-+        self.ChainH = str.strip(line[35])
-+        self.resSeqH = str.strip(line[36:41])
-+        self.ICodeH = str.strip(line[41])
-+        self.name2 = str.strip(line[43:47])
-+        self.altLoc2 = str.strip(line[47])
-+        self.resName2 = str.strip(line[48:51])
-+        self.Chain2 = str.strip(line[52])
-+        self.resSeq2 = str.strip(line[53:58])
-+        self.ICode2 = str.strip(line[58])
-+        self.sym1 = str.strip(line[59:65])
-+        self.sym2 = str.strip(line[66:72])
- 
- @RegisterLineParser
- class LINK(BaseRecord):
-@@ -1267,20 +1267,20 @@
-             67-72    string sym2      Symmetry operator for 2nd atom.
-         """
-         super(LINK, self).__init__(line)
--        self.name1 = string.strip(line[12:16])
--        self.altLoc1 = string.strip(line[16])
--        self.resName1 = string.strip(line[17:20])
--        self.chainID1 = string.strip(line[21])
--        self.resSeq1 = int(string.strip(line[22:26]))
--        self.iCode1 = string.strip(line[26])
--        self.name2 = string.strip(line[42:46])
--        self.altLoc2 = string.strip(line[46])
--        self.resName2 = string.strip(line[47:50])
--        self.chainID2 = string.strip(line[51])
--        self.resSeq2 = int(string.strip(line[52:56]))
--        self.iCode2 = string.strip(line[56])
--        self.sym1 = string.strip(line[59:65])
--        self.sym2 = string.strip(line[66:72])
-+        self.name1 = str.strip(line[12:16])
-+        self.altLoc1 = str.strip(line[16])
-+        self.resName1 = str.strip(line[17:20])
-+        self.chainID1 = str.strip(line[21])
-+        self.resSeq1 = int(str.strip(line[22:26]))
-+        self.iCode1 = str.strip(line[26])
-+        self.name2 = str.strip(line[42:46])
-+        self.altLoc2 = str.strip(line[46])
-+        self.resName2 = str.strip(line[47:50])
-+        self.chainID2 = str.strip(line[51])
-+        self.resSeq2 = int(str.strip(line[52:56]))
-+        self.iCode2 = str.strip(line[56])
-+        self.sym1 = str.strip(line[59:65])
-+        self.sym2 = str.strip(line[66:72])
- 
- 
- @RegisterLineParser
-@@ -1309,15 +1309,15 @@
-             67 - 72  string sym2           Symmetry operator for 2nd residue.
-         """
-         super(SSBOND, self).__init__(line)
--        self.serNum = int(string.strip(line[7:10]))
--        self.chainID1 = string.strip(line[15])
--        self.seqNum1 = int(string.strip(line[17:21]))
--        self.icode1 = string.strip(line[21])
--        self.chainID2 = string.strip(line[29])
--        self.seqNum2 = int(string.strip(line[31:35]))
--        self.icode2 = string.strip(line[35])
--        self.sym1 = string.strip(line[59:65])
--        self.sym2 = string.strip(line[66:72])
-+        self.serNum = int(str.strip(line[7:10]))
-+        self.chainID1 = str.strip(line[15])
-+        self.seqNum1 = int(str.strip(line[17:21]))
-+        self.icode1 = str.strip(line[21])
-+        self.chainID2 = str.strip(line[29])
-+        self.seqNum2 = int(str.strip(line[31:35]))
-+        self.icode2 = str.strip(line[35])
-+        self.sym1 = str.strip(line[59:65])
-+        self.sym2 = str.strip(line[66:72])
- 
- @RegisterLineParser
- class TURN(BaseRecord):
-@@ -1355,17 +1355,17 @@
-             41-70    string comment     Associated comment.
-         """
-         super(TURN, self).__init__(line)
--        self.seq = int(string.strip(line[7:10]))
--        self.turnId = string.strip(line[11:14])
--        self.initResName = string.strip(line[15:18])
--        self.initChainId = string.strip(line[19])
--        self.initSeqNum = int(string.strip(line[20:24]))
--        self.initICode = string.strip(line[24])
--        self.endResName = string.strip(line[26:29])
--        self.endChainId = string.strip(line[30])
--        self.endSeqNum = int(string.strip(line[31:35]))
--        self.endICode = string.strip(line[35])
--        self.comment = string.strip(line[40:70])
-+        self.seq = int(str.strip(line[7:10]))
-+        self.turnId = str.strip(line[11:14])
-+        self.initResName = str.strip(line[15:18])
-+        self.initChainId = str.strip(line[19])
-+        self.initSeqNum = int(str.strip(line[20:24]))
-+        self.initICode = str.strip(line[24])
-+        self.endResName = str.strip(line[26:29])
-+        self.endChainId = str.strip(line[30])
-+        self.endSeqNum = int(str.strip(line[31:35]))
-+        self.endICode = str.strip(line[35])
-+        self.comment = str.strip(line[40:70])
- 
- @RegisterLineParser
- class SHEET(BaseRecord):
-@@ -1424,31 +1424,31 @@
-                                         previous strand.
-         """
-         super(SHEET, self).__init__(line)
--        self.strand = int(string.strip(line[7:10]))
--        self.sheetID = string.strip(line[11:14])
--        self.numStrands = int(string.strip(line[14:16]))
--        self.initResName = string.strip(line[17:20])
--        self.initChainID = string.strip(line[21])
--        self.initSeqNum = int(string.strip(line[22:26]))
--        self.initICode = string.strip(line[26])
--        self.endResName = string.strip(line[28:31])
--        self.endChainID = string.strip(line[32])
--        self.endSeqNum = int(string.strip(line[33:37]))
--        self.endICode = string.strip(line[37])
--        self.sense = int(string.strip(line[38:40]))
-+        self.strand = int(str.strip(line[7:10]))
-+        self.sheetID = str.strip(line[11:14])
-+        self.numStrands = int(str.strip(line[14:16]))
-+        self.initResName = str.strip(line[17:20])
-+        self.initChainID = str.strip(line[21])
-+        self.initSeqNum = int(str.strip(line[22:26]))
-+        self.initICode = str.strip(line[26])
-+        self.endResName = str.strip(line[28:31])
-+        self.endChainID = str.strip(line[32])
-+        self.endSeqNum = int(str.strip(line[33:37]))
-+        self.endICode = str.strip(line[37])
-+        self.sense = int(str.strip(line[38:40]))
-         try:
--            self.curAtom = string.strip(line[41:45])
--            self.curResName = string.strip(line[45:48])
--            self.curChainID = string.strip(line[49])
--            try:  self.curResSeq = int(string.strip(line[50:54]))
-+            self.curAtom = str.strip(line[41:45])
-+            self.curResName = str.strip(line[45:48])
-+            self.curChainID = str.strip(line[49])
-+            try:  self.curResSeq = int(str.strip(line[50:54]))
-             except ValueError:  self.curResSeq = None
--            self.curICode = string.strip(line[54])
--            self.prevAtom = string.strip(line[56:60])
--            self.prevResName = string.strip(line[60:63])
--            self.prevChainID = string.strip(line[64])
--            try:  self.prevResSeq = int(string.strip(line[65:69]))
-+            self.curICode = str.strip(line[54])
-+            self.prevAtom = str.strip(line[56:60])
-+            self.prevResName = str.strip(line[60:63])
-+            self.prevChainID = str.strip(line[64])
-+            try:  self.prevResSeq = int(str.strip(line[65:69]))
-             except ValueError:  self.prevResSeq = None
--            self.prevICode = string.strip(line[69])
-+            self.prevICode = str.strip(line[69])
-         except IndexError:
-             self.curAtom = None
-             self.curResName = None
-@@ -1498,20 +1498,20 @@
-             72-76    int    length      Length of this helix.
-         """
-         super(HELIX, self).__init__(line)
--        self.serNum = int(string.strip(line[7:10]))
--        self.helixID = string.strip(line[11:14])
--        self.initResName = string.strip(line[15:18])
--        self.initChainID = string.strip(line[19])
--        self.initSeqNum = int(string.strip(line[21:25]))
--        self.initICode = string.strip(line[25])
--        self.endResName = string.strip(line[27:30])
--        self.endChainID = string.strip(line[31])
--        self.endSeqNum = int(string.strip(line[33:37]))
--        self.endICode = string.strip(line[37])
--        try:  self.helixClass = int(string.strip(line[38:40]))
-+        self.serNum = int(str.strip(line[7:10]))
-+        self.helixID = str.strip(line[11:14])
-+        self.initResName = str.strip(line[15:18])
-+        self.initChainID = str.strip(line[19])
-+        self.initSeqNum = int(str.strip(line[21:25]))
-+        self.initICode = str.strip(line[25])
-+        self.endResName = str.strip(line[27:30])
-+        self.endChainID = str.strip(line[31])
-+        self.endSeqNum = int(str.strip(line[33:37]))
-+        self.endICode = str.strip(line[37])
-+        try:  self.helixClass = int(str.strip(line[38:40]))
-         except ValueError:  self.helixClass = None
--        self.comment = string.strip(line[40:70])
--        try:  self.length = int(string.strip(line[71:76]))
-+        self.comment = str.strip(line[40:70])
-+        try:  self.length = int(str.strip(line[71:76]))
-         except ValueError:  self.length = None
- 
- @RegisterLineParser
-@@ -1534,10 +1534,10 @@
-             20-70    string text     Chemical formula
-         """
-         super(FORMUL, self).__init__(line)
--        self.compNum = int(string.strip(line[8:10]))
--        self.hetID = string.strip(line[12:15])
--        self.asterisk = string.strip(line[19])
--        self.text = string.strip(line[19:70])
-+        self.compNum = int(str.strip(line[8:10]))
-+        self.hetID = str.strip(line[12:15])
-+        self.asterisk = str.strip(line[19])
-+        self.text = str.strip(line[19:70])
- 
- @RegisterLineParser
- class HETSYN(BaseRecord):
-@@ -1558,8 +1558,8 @@
-             16-70    string hetSynonyms   List of synonyms
-         """
-         super(HETSYN, self).__init__(line)
--        self.hetID = string.strip(line[11:14])
--        self.hetSynonyms = string.strip(line[15:70])
-+        self.hetID = str.strip(line[11:14])
-+        self.hetSynonyms = str.strip(line[15:70])
- 
- @RegisterLineParser
- class HETNAM(BaseRecord):
-@@ -1579,8 +1579,8 @@
-             16-70    string text   Chemical name.
-         """
-         super(HETNAM, self).__init__(line)
--        self.hetID = string.strip(line[11:14])
--        self.text = string.strip(line[15:70])
-+        self.hetID = str.strip(line[11:14])
-+        self.text = str.strip(line[15:70])
- 
- @RegisterLineParser
- class HET(BaseRecord):
-@@ -1613,15 +1613,15 @@
-             31-70    string text        Text describing Het group.
-         """
-         super(HET, self).__init__(line)
--        self.hetID = string.strip(line[7:10])
--        self.chainID = string.strip(line[12])
-+        self.hetID = str.strip(line[7:10])
-+        self.chainID = str.strip(line[12])
-         try:
--            self.seqNum = int(string.strip(line[13]))
-+            self.seqNum = int(str.strip(line[13]))
-         except ValueError:
-             self.seqNum = None
--        self.iCode = string.strip(line[17])
--        self.numHetAtoms = int(string.strip(line[20:25]))
--        self.text = string.strip(line[30:70])
-+        self.iCode = str.strip(line[17])
-+        self.numHetAtoms = int(str.strip(line[20:25]))
-+        self.text = str.strip(line[30:70])
- 
- @RegisterLineParser
- class MODRES(BaseRecord):
-@@ -1648,13 +1648,13 @@
-             30-70    string comment Description of the residue modification.
-         """
-         super(MODRES, self).__init__(line)
--        string.idCode = string.strip(line[7:11])
--        string.resName = string.strip(line[12:15])
--        string.chainID = string.strip(line[16])
--        string.seqNum = int(string.strip(line[18:22]))
--        string.iCode = string.strip(line[22])
--        string.stdRes = string.strip(line[24:27])
--        string.comment = string.strip(line[29:70])
-+        str.idCode = str.strip(line[7:11])
-+        str.resName = str.strip(line[12:15])
-+        str.chainID = str.strip(line[16])
-+        str.seqNum = int(str.strip(line[18:22]))
-+        str.iCode = str.strip(line[22])
-+        str.stdRes = str.strip(line[24:27])
-+        str.comment = str.strip(line[29:70])
- 
- @RegisterLineParser
- class SEQRES(BaseRecord):
-@@ -1694,23 +1694,23 @@
-             68-70    string resName Residue name.
-         """
-         super(SEQRES, self).__init__(line)
--        self.serNum = int(string.strip(line[8:10]))
--        self.chainID = string.strip(line[11])
--        self.numRes = int(string.strip(line[13:17]))
-+        self.serNum = int(str.strip(line[8:10]))
-+        self.chainID = str.strip(line[11])
-+        self.numRes = int(str.strip(line[13:17]))
-         self.resName = []
--        self.resName.append(string.strip(line[19:22]))
--        self.resName.append(string.strip(line[23:26]))
--        self.resName.append(string.strip(line[27:30]))
--        self.resName.append(string.strip(line[31:34]))
--        self.resName.append(string.strip(line[35:38]))
--        self.resName.append(string.strip(line[39:42]))
--        self.resName.append(string.strip(line[43:46]))
--        self.resName.append(string.strip(line[47:50]))
--        self.resName.append(string.strip(line[51:54]))
--        self.resName.append(string.strip(line[55:58]))
--        self.resName.append(string.strip(line[59:62]))
--        self.resName.append(string.strip(line[63:66]))
--        self.resName.append(string.strip(line[67:70]))
-+        self.resName.append(str.strip(line[19:22]))
-+        self.resName.append(str.strip(line[23:26]))
-+        self.resName.append(str.strip(line[27:30]))
-+        self.resName.append(str.strip(line[31:34]))
-+        self.resName.append(str.strip(line[35:38]))
-+        self.resName.append(str.strip(line[39:42]))
-+        self.resName.append(str.strip(line[43:46]))
-+        self.resName.append(str.strip(line[47:50]))
-+        self.resName.append(str.strip(line[51:54]))
-+        self.resName.append(str.strip(line[55:58]))
-+        self.resName.append(str.strip(line[59:62]))
-+        self.resName.append(str.strip(line[63:66]))
-+        self.resName.append(str.strip(line[67:70]))
- 
- @RegisterLineParser
- class SEQADV(BaseRecord):
-@@ -1744,17 +1744,17 @@
-             50-70    string conflict Conflict comment.
-         """
-         super(SEQADV, self).__init__(line)
--        self.idCode = string.strip(line[7:11])
--        self.resName = string.strip(line[12:15])
--        self.chainID = string.strip(line[16])
--        try:  self.seqNum = int(string.strip(line[19:22]))
-+        self.idCode = str.strip(line[7:11])
-+        self.resName = str.strip(line[12:15])
-+        self.chainID = str.strip(line[16])
-+        try:  self.seqNum = int(str.strip(line[19:22]))
-         except ValueError:  self.seqNum = None
--        self.iCode = string.strip(line[22])
--        self.database = string.strip(line[24:28])
--        self.dbIdCode = string.strip(line[29:38])
--        self.dbRes = string.strip(line[39:42])
--        self.dbSeq = int(string.strip(line[43:48]))
--        self.conflict = string.strip(line[49:70])
-+        self.iCode = str.strip(line[22])
-+        self.database = str.strip(line[24:28])
-+        self.dbIdCode = str.strip(line[29:38])
-+        self.dbRes = str.strip(line[39:42])
-+        self.dbSeq = int(str.strip(line[43:48]))
-+        self.conflict = str.strip(line[49:70])
- 
- @RegisterLineParser
- class DBREF(BaseRecord):
-@@ -1805,19 +1805,19 @@
-                                          the reference.
-         """
-         super(DBREF, self).__init__(line)
--        self.idCode = string.strip(line[7:11])
--        self.chainID = string.strip(line[12])
--        self.seqBegin = int(string.strip(line[14:18]))
--        self.insertBegin = string.strip(line[18])
--        self.seqEnd = int(string.strip(line[20:24]))
--        self.insertEnd = string.strip(line[24])
--        self.database = string.strip(line[26:32])
--        self.dbAccession = string.strip(line[33:41])
--        self.dbIdCode = string.strip(line[42:54])
--        self.dbseqBegin = int(string.strip(line[55:60]))
--        self.dbinsBeg = string.strip(line[60])
--        self.dbseqEnd = int(string.strip(line[62:67]))
--        try:  self.dbinsEnd = string.strip(line[67])
-+        self.idCode = str.strip(line[7:11])
-+        self.chainID = str.strip(line[12])
-+        self.seqBegin = int(str.strip(line[14:18]))
-+        self.insertBegin = str.strip(line[18])
-+        self.seqEnd = int(str.strip(line[20:24]))
-+        self.insertEnd = str.strip(line[24])
-+        self.database = str.strip(line[26:32])
-+        self.dbAccession = str.strip(line[33:41])
-+        self.dbIdCode = str.strip(line[42:54])
-+        self.dbseqBegin = int(str.strip(line[55:60]))
-+        self.dbinsBeg = str.strip(line[60])
-+        self.dbseqEnd = int(str.strip(line[62:67]))
-+        try:  self.dbinsEnd = str.strip(line[67])
-         except IndexError:  self.dbinsEnd = None
- 
- @RegisterLineParser
-@@ -1837,32 +1837,32 @@
-             Initialize by parsing line
-         """
-         super(REMARK, self).__init__(line)
--        self.remarkNum = int(string.strip(line[7:10]))
-+        self.remarkNum = int(str.strip(line[7:10]))
-         self.remarkDict = {}
- 
-         if self.remarkNum == 1:
--            subfield = string.strip(line[11:20])
-+            subfield = str.strip(line[11:20])
-             if subfield == "REFERENCE":
--                self.remarkDict["refNum"] = int(string.strip(line[21:70]))
-+                self.remarkDict["refNum"] = int(str.strip(line[21:70]))
-             elif subfield == "AUTH":
--                self.remarkDict["authorList"] = string.strip(line[19:70])
-+                self.remarkDict["authorList"] = str.strip(line[19:70])
-             elif subfield == "TITL":
--                self.remarkDict["title"] = string.strip(line[19:70])
-+                self.remarkDict["title"] = str.strip(line[19:70])
-             elif subfield == "EDIT":
--                self.remarkDict["editorList"] = string.strip(line[19:70])
-+                self.remarkDict["editorList"] = str.strip(line[19:70])
-             elif subfield == "REF":
--                self.remarkDict["ref"] = string.strip(line[19:66])
-+                self.remarkDict["ref"] = str.strip(line[19:66])
-             elif subfield == "PUBL":
--                self.remarkDict["pub"] = string.strip(line[19:70])
-+                self.remarkDict["pub"] = str.strip(line[19:70])
-             elif subfield == "REFN":
--                self.remarkDict["refn"] = string.strip(line[19:70])
-+                self.remarkDict["refn"] = str.strip(line[19:70])
-         elif self.remarkNum == 2:
--            restr = string.strip(line[22:27])
-+            restr = str.strip(line[22:27])
-             try:  self.remarkDict["resolution"] = float(restr)
-             except ValueError:
--                self.remarkDict["comment"] = string.strip(line[11:70])
-+                self.remarkDict["comment"] = str.strip(line[11:70])
-         else:
--            self.remarkDict["text"] = string.strip(line[11:70])
-+            self.remarkDict["text"] = str.strip(line[11:70])
- 
- 
- 
-@@ -1887,7 +1887,7 @@
-         """
-         super(JRNL, self).__init__(line)
-         #TODO: What is this mess?
--        self.text = string.strip(line[12:70])
-+        self.text = str.strip(line[12:70])
- 
- @RegisterLineParser
- class SPRSDE(BaseRecord):
-@@ -1918,17 +1918,17 @@
-             67-70    string sIdCode    ID code of a superseded entry.
-         """
-         super(SPRSDE, self).__init__(line)
--        self.sprsdeDate = string.strip(line[11:20])
--        self.idCode = string.strip(line[21:25])
-+        self.sprsdeDate = str.strip(line[11:20])
-+        self.idCode = str.strip(line[21:25])
-         self.sIdCodes = []
--        self.sIdCodes.append(string.strip(line[31:35]))
--        self.sIdCodes.append(string.strip(line[36:40]))
--        self.sIdCodes.append(string.strip(line[41:45]))
--        self.sIdCodes.append(string.strip(line[46:50]))
--        self.sIdCodes.append(string.strip(line[51:55]))
--        self.sIdCodes.append(string.strip(line[56:60]))
--        self.sIdCodes.append(string.strip(line[61:65]))
--        self.sIdCodes.append(string.strip(line[66:70]))
-+        self.sIdCodes.append(str.strip(line[31:35]))
-+        self.sIdCodes.append(str.strip(line[36:40]))
-+        self.sIdCodes.append(str.strip(line[41:45]))
-+        self.sIdCodes.append(str.strip(line[46:50]))
-+        self.sIdCodes.append(str.strip(line[51:55]))
-+        self.sIdCodes.append(str.strip(line[56:60]))
-+        self.sIdCodes.append(str.strip(line[61:65]))
-+        self.sIdCodes.append(str.strip(line[66:70]))
- 
- @RegisterLineParser
- class REVDAT(BaseRecord):
-@@ -1961,15 +1961,15 @@
-             61-66    string record  Name of the modified record.
-         """
-         super(REVDAT, self).__init__(line)
--        self.modNum = int(string.strip(line[7:10]))
--        self.modDate = string.strip(line[13:22])
--        self.modId = string.strip(line[23:28])
--        self.modType = int(string.strip(line[31]))
-+        self.modNum = int(str.strip(line[7:10]))
-+        self.modDate = str.strip(line[13:22])
-+        self.modId = str.strip(line[23:28])
-+        self.modType = int(str.strip(line[31]))
-         self.records = []
--        self.records.append(string.strip(line[39:45]))
--        self.records.append(string.strip(line[46:52]))
--        self.records.append(string.strip(line[53:59]))
--        self.records.append(string.strip(line[60:66]))
-+        self.records.append(str.strip(line[39:45]))
-+        self.records.append(str.strip(line[46:52]))
-+        self.records.append(str.strip(line[53:59]))
-+        self.records.append(str.strip(line[60:66]))
- 
- @RegisterLineParser
- class AUTHOR(BaseRecord):
-@@ -1989,7 +1989,7 @@
-                                        commas
-         """
-         super(AUTHOR, self).__init__(line)
--        self.authorList = string.strip(line[10:70])
-+        self.authorList = str.strip(line[10:70])
- 
- @RegisterLineParser
- class EXPDTA(BaseRecord):
-@@ -2019,7 +2019,7 @@
-                                       or experiment
-         """
-         super(EXPDTA, self).__init__(line)
--        self.technique = string.strip(line[10:70])
-+        self.technique = str.strip(line[10:70])
- 
- @RegisterLineParser
- class KEYWDS(BaseRecord):
-@@ -2043,7 +2043,7 @@
-                                     to the entry
-         """
-         super(KEYWDS, self).__init__(line)
--        self.keywds = string.strip(line[10:70])
-+        self.keywds = str.strip(line[10:70])
- 
- @RegisterLineParser
- class SOURCE(BaseRecord):
-@@ -2066,7 +2066,7 @@
-                                     in a token: value format
-         """
-         super(SOURCE, self).__init__(line)
--        self.source = string.strip(line[10:70])
-+        self.source = str.strip(line[10:70])
- 
- @RegisterLineParser
- class COMPND(BaseRecord):
-@@ -2094,7 +2094,7 @@
-                                      components.
-         """
-         super(COMPND, self).__init__(line)
--        self.compound = string.strip(line[10:70])
-+        self.compound = str.strip(line[10:70])
- 
- @RegisterLineParser
- class CAVEAT(BaseRecord):
-@@ -2115,8 +2115,8 @@
-                                     CAVEAT.
-         """
-         super(CAVEAT, self).__init__(line)
--        self.idCode = string.strip(line[11:15])
--        self.comment = string.strip(line[19:70])
-+        self.idCode = str.strip(line[11:15])
-+        self.comment = str.strip(line[19:70])
- 
- @RegisterLineParser
- class TITLE(BaseRecord):
-@@ -2136,7 +2136,7 @@
-             11-70    string title  Title of the experiment
-         """
-         super(TITLE, self).__init__(line)
--        self.title = string.strip(line[10:70])
-+        self.title = str.strip(line[10:70])
- 
- @RegisterLineParser
- class OBSLTE(BaseRecord):
-@@ -2176,17 +2176,17 @@
-                                     this one.
-         """
-         super(OBSLTE, self).__init__(line)
--        self.repDate = string.strip(line[11:20])
--        self.idCode = string.strip(line[21:25])
-+        self.repDate = str.strip(line[11:20])
-+        self.idCode = str.strip(line[21:25])
-         self.rIdCodes = []
--        self.rIdCodes.append(string.strip(line[31:35]))
--        self.rIdCodes.append(string.strip(line[36:40]))
--        self.rIdCodes.append(string.strip(line[41:45]))
--        self.rIdCodes.append(string.strip(line[46:50]))
--        self.rIdCodes.append(string.strip(line[51:55]))
--        self.rIdCodes.append(string.strip(line[56:60]))
--        self.rIdCodes.append(string.strip(line[61:65]))
--        self.rIdCodes.append(string.strip(line[67:70]))
-+        self.rIdCodes.append(str.strip(line[31:35]))
-+        self.rIdCodes.append(str.strip(line[36:40]))
-+        self.rIdCodes.append(str.strip(line[41:45]))
-+        self.rIdCodes.append(str.strip(line[46:50]))
-+        self.rIdCodes.append(str.strip(line[51:55]))
-+        self.rIdCodes.append(str.strip(line[56:60]))
-+        self.rIdCodes.append(str.strip(line[61:65]))
-+        self.rIdCodes.append(str.strip(line[67:70]))
- 
- @RegisterLineParser
- class HEADER(BaseRecord):
-@@ -2210,9 +2210,9 @@
-            63-66    string idCode         This identifier is unique within PDB
-         """
-         super(HEADER, self).__init__(line)
--        self.classification = string.strip(line[10:50])
--        self.depDate = string.strip(line[50:59])
--        self.IDcode = string.strip(line[62:66])
-+        self.classification = str.strip(line[10:50])
-+        self.depDate = str.strip(line[50:59])
-+        self.IDcode = str.strip(line[62:66])
- 
- def readAtom(line):
-     """
-@@ -2223,22 +2223,22 @@
-         Parameters
-             line:  The line to parse(string)
-        if record == ATOM:
--            self.serial = int(string.strip(line[6:11]))
--            self.name = string.strip(line[12:16])
--            self.altLoc = string.strip(line[16])
--            self.resName = string.strip(line[17:20])
--            self.chainID = string.strip(line[21])
--            self.resSeq = int(string.strip(line[22:26]))
--            self.iCode = string.strip(line[26])
--            self.x = float(string.strip(line[30:38]))
--            self.y = float(string.strip(line[38:46]))
--            self.z = float(string.strip(line[46:54]))
-+            self.serial = int(str.strip(line[6:11]))
-+            self.name = str.strip(line[12:16])
-+            self.altLoc = str.strip(line[16])
-+            self.resName = str.strip(line[17:20])
-+            self.chainID = str.strip(line[21])
-+            self.resSeq = int(str.strip(line[22:26]))
-+            self.iCode = str.strip(line[26])
-+            self.x = float(str.strip(line[30:38]))
-+            self.y = float(str.strip(line[38:46]))
-+            self.z = float(str.strip(line[46:54]))
-             try:
--                self.occupancy = float(string.strip(line[54:60]))
--                self.tempFactor = float(string.strip(line[60:66]))
--                self.segID = string.strip(line[72:76])
--                self.element = string.strip(line[76:78])
--                self.charge = string.strip(line[78:80])
-+                self.occupancy = float(str.strip(line[54:60]))
-+                self.tempFactor = float(str.strip(line[60:66]))
-+                self.segID = str.strip(line[72:76])
-+                self.element = str.strip(line[76:78])
-+                self.charge = str.strip(line[78:80])
-             except ValueError, IndexError:
-                 self.occupancy = 0.00
-                 self.tempFactor = 0.00
-@@ -2249,7 +2249,7 @@
-     """
- 
-     # Try to find 5 consecutive floats
--    words = string.split(line)
-+    words = str.split(line)
-     size = len(words) - 1
-     consec = 0
-     for i in range(size):
-@@ -2262,15 +2262,15 @@
-         except ValueError:
-             consec = 0
- 
--    record = string.strip(line[0:6])
-+    record = str.strip(line[0:6])
-     newline = line[0:22]
--    newline = newline + string.rjust(words[size-i-1],4)
--    newline = newline + string.rjust("",3)
--    newline = newline + string.rjust(words[size-i],8)
--    newline = newline + string.rjust(words[size-i+1],8)
--    newline = newline + string.rjust(words[size-i+2],8)
--    newline = newline + string.rjust(words[size-i+3],6)
--    newline = newline + string.rjust(words[size-i+4],6)
-+    newline = newline + str.rjust(words[size-i-1],4)
-+    newline = newline + str.rjust("",3)
-+    newline = newline + str.rjust(words[size-i],8)
-+    newline = newline + str.rjust(words[size-i+1],8)
-+    newline = newline + str.rjust(words[size-i+2],8)
-+    newline = newline + str.rjust(words[size-i+3],6)
-+    newline = newline + str.rjust(words[size-i+4],6)
-     klass = lineParsers[record]
-     obj = klass(newline)
-     return obj
-@@ -2292,14 +2292,14 @@
-         return pdblist, errlist
- 
-     while 1:
--        line = string.strip(file.readline())
-+        line = file.readline().strip()
-         if line == '':
-             break
- 
-         # We assume we have a method for each PDB record and can therefore
-         # parse them automatically
-         try:
--            record = string.strip(line[0:6])
-+            record = line[0:6].strip()
-             if record not in errlist:
-                 klass = lineParsers[record]
-                 obj = klass(line)
-@@ -2307,24 +2307,24 @@
-         except KeyError as details:
-             errlist.append(record)
-             sys.stderr.write("Error parsing line: %s\n" % details)
--            sys.stderr.write("<%s>\n" % string.strip(line))
-+            sys.stderr.write("<%s>\n" % line.strip())
-             sys.stderr.write("Truncating remaining errors for record type:%s\n" % record)
--        except StandardError as details:
-+        except Exception as details:
-             if record == "ATOM" or record == "HETATM":
-                 try:
-                     obj = readAtom(line)
-                     pdblist.append(obj)
--                except StandardError, details:
-+                except Exception as details:
-                     sys.stderr.write("Error parsing line: %s\n" % details)
--                    sys.stderr.write("<%s>\n" % string.strip(line))
-+                    sys.stderr.write("<%s>\n" % line.strip())
-             elif record == "SITE" or record == "TURN":
-                 pass
-             elif record == "SSBOND" or record == "LINK":
-                 sys.stderr.write("Warning -- ignoring record: \n")
--                sys.stderr.write("<%s>\n" % string.strip(line))
-+                sys.stderr.write("<%s>\n" % line.strip())
-             else:
-                 sys.stderr.write("Error parsing line: %s\n" % details)
--                sys.stderr.write("<%s>\n" % string.strip(line))
-+                sys.stderr.write("<%s>\n" % line.strip())
- 
-     return pdblist, errlist
- 
-@@ -2338,11 +2338,11 @@
- 
-     URL = "ftp://ftp.rcsb.org/pub/pdb/data/structures/all/pdb/"
-     pdblines = os.popen("ncftpls %s" % URL).readlines()
--    pdbline = string.join(pdblines)
--    pdbline = string.replace(pdbline, "\n", "")
--    pdbline = string.replace(pdbline, "@", "")
--    pdbline = string.strip(pdbline)
--    pdblist = string.split(pdbline)
-+    pdbline = str.join(pdblines)
-+    pdbline = str.replace(pdbline, "\n", "")
-+    pdbline = str.replace(pdbline, "@", "")
-+    pdbline = str.strip(pdbline)
-+    pdblist = str.split(pdbline)
-     pdbZ = random.choice(pdblist)
-     os.popen("ncftpget %s/%s" % (URL, pdbZ))
-     os.popen("uncompress %s" % pdbZ)
---- a/src/protein.py
-+++ b/src/protein.py
-@@ -48,10 +48,10 @@
- __date__ = "13 May 2008"
- __author__ = "Todd Dolinsky, Yong Huang"
- 
--from pdb import *
--from structures import *
--from aa import *
--from na import *
-+from .pdb import *
-+from .structures import *
-+from .aa import *
-+from .na import *
- 
- class Protein:
-     """
-@@ -143,11 +143,11 @@
- 
-         # Make a list for sequential ordering of chains
-         
--        if chainDict.has_key(""):
-+        if "" in chainDict:
-             chainDict["ZZ"] = chainDict[""]
-             del chainDict[""]
- 
--        keys = chainDict.keys()
-+        keys = list(chainDict.keys())
-         keys.sort()
- 
-         for key in keys:
-@@ -227,8 +227,8 @@
-                 definition: The definition objects.
-                 outfilename:  The name of the file to write (string)
-         """
--        from forcefield import Forcefield
--        from aconf import STYLESHEET
-+        from .forcefield import Forcefield
-+        from .aconf import STYLESHEET
- 
-         # Cache the initial atom numbers
-         numcache = {}
---- a/src/psize.py
-+++ b/src/psize.py
-@@ -76,7 +76,7 @@
- 
-     def parseString(self, structure):
-         """ Parse the input structure as a string in PDB or PQR format """
--        lines = string.split(structure, "\n")
-+        lines = structure.split("\n")
-         self.parseLines(lines)
- 
-     def parseInput(self, filename):
-@@ -87,9 +87,9 @@
-     def parseLines(self, lines):
-         """ Parse the lines """
-         for line in lines:
--            if string.find(line,"ATOM") == 0:
--                subline = string.replace(line[30:], "-", " -")
--                words = string.split(subline)
-+            if line.startswith("ATOM"):
-+                subline = line[30:].replace("-", " -")
-+                words = subline.split()
-                 if len(words) < 5:    
-                     continue
-                 self.gotatom += 1
-@@ -103,12 +103,12 @@
-                         self.minlen[i] = center[i]-rad
-                     if self.maxlen[i] == None or center[i]+rad > self.maxlen[i]:
-                         self.maxlen[i] = center[i]+rad
--            elif string.find(line, "HETATM") == 0:
-+            elif line.startswith("HETATM"):
-                 self.gothet = self.gothet + 1
-                 # Special handling for no ATOM entries in the pqr file, only HETATM entries
-                 if self.gotatom == 0:
--                    subline = string.replace(line[30:], "-", " -")
--                    words = string.split(subline)
-+                    subline = line[30:].replace("-", " -")
-+                    words = subline.split()
-                     if len(words) < 5:    
-                         continue
-                     self.q = self.q + float(words[3])
-@@ -191,7 +191,7 @@
-             else:
-                 i = nsmall.index(max(nsmall))
-                 nsmall[i] = 32 * ((nsmall[i] - 1)/32 - 1) + 1
--                if nsmall <= 0:
-+                if nsmall[i] <= 0:
-                     stdout.write("You picked a memory ceiling that is too small\n")
-                     sys.exit(0)        
- 
-@@ -380,7 +380,7 @@
-     longOptList = ["help", "cfac=", "fadd=", "space=", "gmemfac=", "gmemceil=", "ofrac=", "redfac="]
-     try:
-         opts, args = getopt.getopt(sys.argv[1:], shortOptList, longOptList)
--    except getopt.GetoptError, details:
-+    except getopt.GetoptError as details:
-         stderr.write("Option error (%s)!\n" % details)
-         usage(2)
-     if len(args) != 1: 
---- a/src/quatfit.py
-+++ b/src/quatfit.py
-@@ -61,7 +61,7 @@
- __author__ = "David Heisterberg, Jan Labanowski, Jens Erik Nielsen, Todd Dolinsky"
- 
- import math
--from utilities import *
-+from .utilities import *
- 
- def findCoordinates(numpoints, refcoords, defcoords, defatomcoords):
-     """
---- a/src/routines.py
-+++ b/src/routines.py
-@@ -64,15 +64,15 @@
- 
- import math
- import copy
--from pdb import *
--from utilities import *
--from quatfit import *
--from forcefield import *
--from structures import *
--from protein import *
--from definitions import *
--from StringIO import StringIO
--from errors import PDBInputError, PDBInternalError, PDB2PKAError
-+from .pdb import *
-+from .utilities import *
-+from .quatfit import *
-+from .forcefield import *
-+from .structures import *
-+from .protein import *
-+from .definitions import *
-+from io import StringIO
-+from .errors import PDBInputError, PDBInternalError, PDB2PKAError
- from pprint import pformat
- 
- 
-@@ -1172,7 +1172,7 @@
-             bestangle = originalAngle = residue.dihedrals[anglenum]
- 
-             #Skip the first angle as it's already known.
--            for i in xrange(1, ANGLE_STEPS):
-+            for i in range(1, ANGLE_STEPS):
-                 newangle = originalAngle + (ANGLE_STEP_SIZE * i)
-                 self.setDihedralAngle(residue, anglenum, newangle)
- 
-@@ -1373,7 +1373,7 @@
-         bestnum = -1
-         best = 0
- 
--        iList = range(len(residue.dihedrals))
-+        iList = list(range(len(residue.dihedrals)))
-         #Make sure our testing is done round robin.
-         if oldnum is not None and oldnum >= 0 and len(iList) > 0:
-             del iList[oldnum]
-@@ -1517,7 +1517,7 @@
-                                                  restart=pdb2pka_params.get('clean_output'),
-                                                  pairene=pdb2pka_params.get('pairene'))
- 
--        print 'Doing full pKa calculation'
-+        print('Doing full pKa calculation')
-         mypkaRoutines.runpKa()
- 
-         pdb2pka_warnings = mypkaRoutines.warnings[:]
-@@ -1525,7 +1525,7 @@
-         self.warnings.extend(pdb2pka_warnings)
- 
-         residue_ph = {}
--        for pka_residue_tuple, calc_ph in mypkaRoutines.ph_at_0_5.iteritems():
-+        for pka_residue_tuple, calc_ph in mypkaRoutines.ph_at_0_5.items():
-             tit_type, chain_id, number_str = pka_residue_tuple
-             if tit_type == 'NTR':
-                 tit_type = 'N+'
-@@ -1578,8 +1578,12 @@
-             if not atom.isHydrogen():
-                 atomtxt = atom.getPDBString()
-                 atomtxt = atomtxt[:linelen]
-+                try:
-+                    atomtxt=unicode(atomtxt)   # Backwards py2 compatibility. Exc on py3
-+                except:
-+                    pass
-                 HFreeProteinFile.write(atomtxt)
--                HFreeProteinFile.write('\n')
-+                HFreeProteinFile.write(u'\n')
- 
- 
-         HFreeProteinFile.seek(0)
-@@ -1603,8 +1607,8 @@
-                 for residue in chain.residues:
-                     if residue.resName == residue_type:
-                         #Strip out the extra space after C- or N+
--                        key = string.strip('%s %s %s' % (string.strip(residue.resName),
--                                                        residue.resNumb, residue.chainID))
-+                        key = ('%s %s %s' % (residue.resName.strip(),
-+                                             residue.resNumb, residue.chainID)).strip()
-                         pkadic[key] = residue.pKa_pro
- 
-         if len(pkadic) == 0:
-@@ -1630,7 +1634,7 @@
- 
-             if residue.isNterm:
-                 key = "N+ %i %s" % (resnum, chainID)
--                key = string.strip(key)
-+                key = key.strip()
-                 if key in pkadic:
-                     value = pkadic[key]
-                     del pkadic[key]
-@@ -1643,7 +1647,7 @@
- 
-             if residue.isCterm:
-                 key = "C- %i %s" % (resnum, chainID)
--                key = string.strip(key)
-+                key = key.strip()
-                 if key in pkadic:
-                     value = pkadic[key]
-                     del pkadic[key]
-@@ -1655,7 +1659,7 @@
-                             self.applyPatch("NEUTRAL-CTERM", residue)
- 
-             key = "%s %i %s" % (resname, resnum, chainID)
--            key = string.strip(key)
-+            key = key.strip()
-             if key in pkadic:
-                 value = pkadic[key]
-                 del pkadic[key]
-@@ -1797,21 +1801,21 @@
- 
-         x = atom.get("x")
-         if x < 0:
--            x = (int(x) - 1) / size * size
-+            x = (int(x) - 1) // size * size
-         else:
--            x = int(x) / size * size
-+            x = int(x) // size * size
- 
-         y = atom.get("y")
-         if y < 0:
--            y = (int(y) - 1) / size * size
-+            y = (int(y) - 1) // size * size
-         else:
--            y = int(y) / size * size
-+            y = int(y) // size * size
- 
-         z = atom.get("z")
-         if z < 0:
--            z = (int(z) - 1) / size * size
-+            z = (int(z) - 1) // size * size
-         else:
--            z = int(z) / size * size
-+            z = int(z) // size * size
- 
-         key = (x, y, z)
-         try:
---- a/src/server.py
-+++ b/src/server.py
-@@ -51,7 +51,7 @@
- import os
- import sys
- import time
--from aconf import *
-+from .aconf import *
- 
- # GLOBAL SERVER VARIABLES
- #Currently this file is unused. TODO: Nuke it?
---- a/src/server.py.in
-+++ b/src/server.py.in
-@@ -51,7 +51,7 @@
- import os
- import sys
- import time
--from aconf import *
-+from .aconf import *
- 
- # GLOBAL SERVER VARIABLES
- 
---- a/src/structures.py
-+++ b/src/structures.py
-@@ -51,10 +51,10 @@
- BACKBONE = ["N","CA","C","O","O2","HA","HN","H","tN"]
- 
- import string
--from pdb import *
--from utilities import *
--from quatfit import *
--from errors import PDBInternalError
-+from .pdb import *
-+from .utilities import *
-+from .quatfit import *
-+from .errors import PDBInternalError
- 
- class Chain:
-     """
-@@ -625,40 +625,40 @@
-         """
-         outstr = ""
-         tstr = self.type
--        outstr += string.ljust(tstr, 6)[:6]
-+        outstr += str.ljust(tstr, 6)[:6]
-         tstr = "%d" % self.serial
--        outstr += string.rjust(tstr, 5)[:5]
-+        outstr += str.rjust(tstr, 5)[:5]
-         outstr += " "
-         tstr = self.name
-         if len(tstr) == 4 or len(tstr.strip("FLIP")) == 4:
--            outstr += string.ljust(tstr, 4)[:4]
-+            outstr += str.ljust(tstr, 4)[:4]
-         else:
--            outstr += " " + string.ljust(tstr, 3)[:3]
-+            outstr += " " + str.ljust(tstr, 3)[:3]
- 
-         tstr = self.resName
-         if len(tstr) == 4:
--            outstr += string.ljust(tstr, 4)[:4]
-+            outstr += str.ljust(tstr, 4)[:4]
-         else:
--            outstr += " " + string.ljust(tstr, 3)[:3]
-+            outstr += " " + str.ljust(tstr, 3)[:3]
-             
-         outstr += " "
-         if chainflag:
-             tstr = self.chainID
-         else:
-             tstr = ''
--        outstr += string.ljust(tstr, 1)[:1]
-+        outstr += str.ljust(tstr, 1)[:1]
-         tstr = "%d" % self.resSeq
--        outstr += string.rjust(tstr, 4)[:4]
-+        outstr += str.rjust(tstr, 4)[:4]
-         if self.iCode != "":
-             outstr += "%s   " % self.iCode
-         else:
-             outstr += "    "
-         tstr = "%8.3f" % self.x
--        outstr += string.ljust(tstr, 8)[:8]
-+        outstr += str.ljust(tstr, 8)[:8]
-         tstr = "%8.3f" % self.y
--        outstr += string.ljust(tstr, 8)[:8]
-+        outstr += str.ljust(tstr, 8)[:8]
-         tstr = "%8.3f" % self.z
--        outstr += string.ljust(tstr, 8)[:8] 
-+        outstr += str.ljust(tstr, 8)[:8] 
-         return outstr
-         
-     def __str__(self):
-@@ -692,12 +692,12 @@
-             ffcharge = "%.4f" % self.ffcharge
-         else: 
-             ffcharge = "0.0000"
--        outstr += string.rjust(ffcharge, 8)[:8]
-+        outstr += str.rjust(ffcharge, 8)[:8]
-         if self.radius != None: 
-             ffradius = "%.4f" % self.radius
-         else: 
-             ffradius = "0.0000"
--        outstr += string.rjust(ffradius, 7)[:7]
-+        outstr += str.rjust(ffradius, 7)[:7]
- 
-         return outstr
-     
-@@ -717,17 +717,17 @@
-         outstr = self.getCommonStringRep(chainflag=True)
-         
-         tstr = "%6.2f" % self.occupancy
--        outstr += string.ljust(tstr, 6)[:6]
-+        outstr += str.ljust(tstr, 6)[:6]
-         tstr = "%6.2f" % self.tempFactor
--        outstr += string.rjust(tstr, 6)[:6]
-+        outstr += str.rjust(tstr, 6)[:6]
-         #padding between temp factor and segID
-         outstr += ' ' * 7
-         tstr = self.segID
--        outstr += string.ljust(tstr, 4)[:4]
-+        outstr += str.ljust(tstr, 4)[:4]
-         tstr = self.element
--        outstr += string.ljust(tstr, 2)[:2]
-+        outstr += str.ljust(tstr, 2)[:2]
-         tstr = str(self.charge)
--        outstr += string.ljust(tstr, 2)[:2]
-+        outstr += str.ljust(tstr, 2)[:2]
- 
- 
-         return outstr
---- a/src/topology.py
-+++ b/src/topology.py
-@@ -81,23 +81,23 @@
- 				pass
- 			elif tagName == "residue":
- 				if self.currentResidue != None:
--					print "** Overwriting current TopologyResidue object!"
-+					print("** Overwriting current TopologyResidue object!")
- 				self.currentResidue = TopologyResidue(self)
- 			elif tagName == "reference":
- 				if self.currentReference != None:
--					print "** Overwriting current TopologyReference object!"
-+					print("** Overwriting current TopologyReference object!")
- 				self.currentReference = TopologyReference(self.currentResidue)
- 			elif tagName == "titrationstate":
- 				if self.currentTitrationState != None:
--					print "** Overwriting current TopologyTitrationState object!"
-+					print("** Overwriting current TopologyTitrationState object!")
- 				self.currentTitrationState = TopologyTitrationState(self.currentResidue)
- 			elif tagName == "tautomer":
- 				if self.currentTautomer != None:
--					print "** Overwriting current Tautomer object!"
-+					print("** Overwriting current Tautomer object!")
- 				self.currentTautomer = TopologyTautomer(self.currentTitrationState)
- 			elif tagName == "conformer":
- 				if self.currentConformer != None:
--					print "** Overwriting current Conformer object!"
-+					print("** Overwriting current Conformer object!")
- 				self.currentConformer = TopologyConformer(self.currentTautomer)
- 			elif tagName == "name":
- 				self.currentElement = tagName
-@@ -112,7 +112,7 @@
- 					#print "    Adding atom to reference..."
- 					self.currentAtom = TopologyAtom(self.currentReference)
- 				else:
--					print "** Don't know what to do with this atom!"
-+					print("** Don't know what to do with this atom!")
- 			elif tagName == "x":
- 				self.currentElement = tagName
- 			elif tagName == "y":
-@@ -135,7 +135,7 @@
- 					#print "    Adding dihedral to reference..."
- 					self.currentDihedral = TopologyDihedral(self.currentReference)
- 				else:
--					print "** Don't know what to do with this dihedral!"
-+					print("** Don't know what to do with this dihedral!")
- 			elif tagName == "add":
- 				self.currentConformerAdd = TopologyConformerAdd(self.currentConformer)
- 			elif tagName == "remove":
-@@ -145,7 +145,7 @@
- 				#print "incomplete state encounted, skipping!"
- 				self.incomplete = 1
- 			else:
--				print "** NOT handling %s start tag" % tagName
-+				print("** NOT handling %s start tag" % tagName)
- 			
- 	def endElement(self, tagName):
- 		if not self.incomplete:
-@@ -190,7 +190,7 @@
- 			elif tagName == "topology":
- 				pass
- 			else:
--				print "** NOT handling %s end tag" % tagName
-+				print("** NOT handling %s end tag" % tagName)
- 		else:
- 			if tagName == "incomplete":
- 				self.incomplete = 0
-@@ -218,7 +218,7 @@
- 					#print "    Setting residue name to %s" % text
- 					self.currentResidue.name = text
- 				else:
--					print "    *** Don't know what to do with name %s!" % text
-+					print("    *** Don't know what to do with name %s!" % text)
- 			elif self.currentElement == "x":
- 				#print "    Setting atom x coordinate to %s" % text
- 				self.currentAtom.x = float(text)
-@@ -238,7 +238,7 @@
- 				#print "    Setting dihedral text to %s" % text
- 				self.currentDihedral.atomList = text
- 			else:
--				print "** NOT handling character text:  %s" % text
-+				print("** NOT handling character text:  %s" % text)
- 			
- 
- class TopologyResidue:
---- a/src/utilities.py
-+++ b/src/utilities.py
-@@ -53,7 +53,7 @@
- import os
- from os.path import splitext 
- import sys
--from aconf import INSTALLDIR, TMPDIR
-+from .aconf import INSTALLDIR, TMPDIR
- 
- def startLogFile(jobName, fileName, logInput):
-     with open('%s%s%s/%s' % (INSTALLDIR, TMPDIR, jobName, fileName), 'w') as f:
-@@ -203,7 +203,7 @@
-     path = path + [start]
-     if start == end:
-         return path
--    if not graph.has_key(start):
-+    if start not in graph:
-         return None
-     shortest = None
-     for node in graph[start]:
-@@ -368,7 +368,11 @@
-             file:  File object containing PDB file (file object)
-     """
- 
--    import os, urllib
-+    import os
-+    if sys.version_info[0] == 2:
-+        import urllib
-+    else:
-+        import urllib.request as urllib
- 
-     file = None
-     if not os.path.isfile(path):


=====================================
debian/patches/python3_scriptbang.patch deleted
=====================================
@@ -1,8 +0,0 @@
---- a/src/psize.py
-+++ b/src/psize.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- 
- """ psize class
- 


=====================================
debian/patches/series
=====================================
@@ -1,4 +1 @@
-#no_privacy_breach_logo.patch
-#python3_PR516.patch
-#python3_scriptbang.patch
 skip-network-tests.patch



View it on GitLab: https://salsa.debian.org/med-team/pdb2pqr/-/compare/2be98be2085d68aceecbf7a0efa0361c402f1a7c...4661b22ec8852d484d9ecd5f9a836ad461b7063d

-- 
View it on GitLab: https://salsa.debian.org/med-team/pdb2pqr/-/compare/2be98be2085d68aceecbf7a0efa0361c402f1a7c...4661b22ec8852d484d9ecd5f9a836ad461b7063d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220303/768932b4/attachment-0001.htm>


More information about the debian-med-commit mailing list