openfold.np.relax.utils

Utils for minimization.

Functions

assert_equal_nonterminal_atom_types(...)

Checks that pre- and post-minimized proteins have same atom set.

overwrite_b_factors(pdb_str, bfactors)

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

overwrite_pdb_coordinates(pdb_str, pos)

assert_equal_nonterminal_atom_types(atom_mask, ref_atom_mask)

Checks that pre- and post-minimized proteins have same atom set.

Parameters:
overwrite_b_factors(pdb_str, bfactors)

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

Parameters:
  • pdb_str (str) – An input PDB string.

  • bfactors (ndarray) – 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.

Return type:

str

overwrite_pdb_coordinates(pdb_str, pos)
Parameters:

pdb_str (str)

Return type:

str