class pdb2sql.interface.interface(pdb, **kwargs)[source]

Create an independent SQL database for interface object.


pdb (str, list, ndarray, pdb2sql) – pdb file or data, or pdb2sql object. If pdb2sql object is used, all changes in the database of pdb2sql object before initializing the interface instance will be used in the new sql database of the interface instance; afterwards, two databses will be independent from each other.


>>> from pdb2sql import pdb2sql
>>> from pdb2sql import interface
>>> # use pdb2sql object as input
>>> pdb_db = pdb2sql('3CRO.pdb')
>>> interface_db1 = interface(pdb_db)
>>> # use pdb file as input
>>> interface_db2 = interface('3CRO.pdb')

Contact Atoms

get_contact_atoms([cutoff, allchains, ...])

Get rowIDs of contact atoms.

Contact Residues

get_contact_residues([cutoff, allchains, ...])

Get contact residues represented with (chain,resSeq, resname).