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

Update the database with given values.

  • columns (str) –

    names of column to update, e.g. “x,y,z”. Avaiable columns:

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

  • values (np.ndarray) – an array of values that corresponds to the number of columns and atoms selected.

  • kwargs – selection arguments, eg: name = [‘CA’, ‘O’], chainID = [‘A’], or no_name = [‘CA’, ‘C’], no_chainID = [‘A’].


>>> values = np.array([[1.,2.,3.], [4.,5.,6.]])
>>> db.update("x,y,z", values=values, resName='MET', name=['CA', 'CB'])