add_column

pdb2sql.add_column(colname, coltype='FLOAT', value=0, tablename='ATOM')[source]

Add an new column to the ATOM table with same value for each row.

Parameters:
  • colname (str) – the new column name

  • coltype (str) – data type of the new column. Default to float.

  • value (int/float/str) – value for the new column. Default to 0.

Examples

>>> db.add_column('id', coltype='str', value='positive')