schrodinger.protein.getpdb_utility module¶
Copy a PDB file out of the PDB directory, or, if not found, download it from the rcsb repository: http://rcsb.org/. Current download URLs are documented at http://www.rcsb.org/pdb/static.do?p=download/http/index.html
Note: the location of the PDB directory can be specified via environment variables; the order of precedence is:
- SCHRODINGER_PDB
- SCHRODINGER_THIRDPARTY
- SCHRODINGER/thirdparty (the default)
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.protein.getpdb_utility.
Chain
(name, code, debug=False)¶ Bases:
object
Class to handle splitting a chain out of a PDB file.
-
checkOK
()¶ Check to see if everything went OK writing the file.
Return type: bool Returns: True if everything checks out OK, false if not
-
closeFile
()¶ Add the END tag and close the chain file
-
openFile
(web)¶
-
-
class
schrodinger.protein.getpdb_utility.
Code
(code, debug=False)¶ Bases:
object
Class to handle all the various files for each PDB code.
-
addChain
(chain)¶ Add another Chain ID to be extracted from the parent file.
Parameters: chain (1 character string or None) – The Chain ID to be extracted. If chain is None, then the whole PDB file is desired.
-
checkOK
()¶ Check to make sure all the files were written properly.
Return type: bool Returns: True if all the files were written properly, False if there were any problems.
-
closeFiles
()¶ Close all the files
-
findLocally
(local_dirs)¶ Check a series of local directories and filenames for the PDB files.
First we look for current files ending in .gz or .Z, then obsolete files with the same endings. The file name we search for is:
pdbXXXX.ent.Y where XXXX is the PDB code and Y is either gz or Z
-
handleObsolete
()¶ Print a warning if we are using a file from the obsolete directory
-
openFiles
(web=False)¶ Prepare all the chain and whole PDB files for writing.
Parameters: web (bool) – True if the source file is from the web, False if not. In this case “from the web” means uncompressed and in the destination directory with the correct name.
-
sidechains
()¶ Check if any chains are to be extracted.
Return type: bool Returns: True if any chains are to be extracted, False if not
-
wholePDB
()¶ Returns True if the whole PDB file should be kept
-
-
class
schrodinger.protein.getpdb_utility.
WholePDB
(code)¶ Bases:
object
Class to take care of the file work for entire PDB files.
-
checkOK
()¶ This is just a stub routine for compatibility with the Chain class
Return type: bool Returns: True
-
closeFile
()¶ Close the file if it is open
-
openFile
(web)¶
-
-
schrodinger.protein.getpdb_utility.
download_format
(pdb_code, file_format, chain=None)¶ Attemps to download the file of requested format for the given given PDB ID and (optinally) chain.
Parameters:
-
schrodinger.protein.getpdb_utility.
ez_print
(message)¶ Prints a list of strings all on one line
-
schrodinger.protein.getpdb_utility.
from_maestro
(*args)¶
-
schrodinger.protein.getpdb_utility.
invalid_code
(acode)¶ Print a warning that a given code is invalid
-
schrodinger.protein.getpdb_utility.
main
(args)¶
-
schrodinger.protein.getpdb_utility.
parse_arguments
(args)¶