deepfold.relax.utils.overwrite_b_factors

deepfold.relax.utils.overwrite_b_factors(pdb_str: str, bfactors: ndarray) str[source]

Overwrites the B-factors in pdb_str with contents of bfactors array.

Parameters:
  • pdb_str – An input PDB string.

  • bfactors – A numpy array with shape [1, n_residues, 37]. We assume that the B-factors are per residue; i.e. that the nonzero entries are identical in [0, i, :].

Returns:

A new PDB string with the B-factors replaced.