OpenStructure
|
Public Member Functions | |
def | __init__ (self, name, url_pattern, type, id_transform='upper') |
def | URLForID (self, id) |
def | Get (self, id) |
def | Load (self, id) |
Data Fields | |
name | |
url_pattern | |
type | |
id_transform | |
A remote repository represents a structural database accessible through the internet, e.g. the PDB or SWISS-MODEL template library. :param name: Name of the repository :param url_pattern: URL pattern for repository. Required format is described in :func:`URLForID` :param type: Data format to expect at resolved URL must be in ('pdb', 'cif') :param id_transform: Transformation to apply to ID before resolving URL in :func:`URLForID`. Must be in ('lower', 'upper') :type name: :class:`str` :type url_pattern: :class:`str` :type type: :class:`str` :type id_transform: :class:`str`
def __init__ | ( | self, | |
name, | |||
url_pattern, | |||
type, | |||
id_transform = 'upper' |
|||
) |
def Get | ( | self, | |
id | |||
) |
def Load | ( | self, | |
id | |||
) |
Resolves URL with :func:`URLForID` and directly loads/returns the according :class:`ost.mol.EntityHandle`. Loading invokes the :func:`ost.io.LoadPDB`/:func:`ost.io.LoadMMCIF` with default parameterization. If you need custom settings, you might want to consider to call :func:`Get` and do the loading manually. :param id: ID to resolve :type id: :class:`str`
def URLForID | ( | self, | |
id | |||
) |
Resolves URL given *url_pattern* and *id_transform* provided at object initialization. The *url_pattern* must contain substring '$ID'. Given *id*, the URL to the structure gets constructed by applying *id_transform* and inserting it at the location of '$ID'. e.g. 'https://files.rcsb.org/view/$ID.pdb' given 1ake as *id* and 'upper' as *id_transform* resolves to: 'https://files.rcsb.org/view/1AKE.pdb'