Definition
The embedding similarity energy measures how much the current per-residue embeddings deviate from reference embeddings, using cosine similarity.- is the current embedding vector for residue (L2-normalized)
- is the reference embedding vector for residue (L2-normalized)
- is the cosine similarity
- is the number of residues in the group
Parameters
EmbeddingOracle
required
The oracle that will be used to calculate the embeddings.
list[Residue]
required
Which residues to include in the calculation.
npt.NDArray[np.float64]
required
The reference embeddings to compare to.
float
default:"1.0"
The weight of the energy term.
str | None
default:"None"
Optional name to append to the energy term name.
Methods
compute
ParametersOraclesResultDict
required
conserved_index_list
Returns the indices of the conserved residues (stored in .residue_group[0]) in the pLM embedding array. Parameterslist[Chain]
required
