biomol.CIFMol.update_features#

CIFMol.update_features(level, **features)#

Update features at a specific structure level.

Parameters:
  • level (StructureLevel) – The structure level at which to update features.

  • **features (Feature | NDArray[Any]) – Key-value pairs of features to update. Values can be either Feature objects or numpy arrays (which will be converted to NodeFeature).

Returns:

Updated BioMol object.

Return type:

mol

Notes

Does not modify the current BioMol instance; instead, returns a new one.

Examples

mol = BioMol(...)
new_mol = mol.update_features(
    StructureLevel.ATOM,
    coord=mol.atoms.coord + 1.0,
)