get

pdb2sql.get(columns, tablename='ATOM', **kwargs)[source]

Exectute simple SQL query to extract values.

Parameters
  • columns (str) –

    columns to retreive, eg: “x,y,z”. if “*” all the columns are returned. Avaiable columns:

    serial, name, altLoc, resName, chainID, resSeq, iCode, x, y, z, occ, temp, element, model

  • kwargs

    argument to select atoms, dict value must be list, e.g.:

    • name = [‘CA’, ‘O’]

    • no_name = [‘CA’, ‘C’]

    • chainID = [‘A’]

    • no_chainID = [‘A’]

Returns

data – list containing the value of the attributes

Examples

>>> db.get('x,y,z', chainID=['A'], no_resName=['ALA', 'TRP'])