📐 Geometry API
chain_nerf(init_coords, bond_lengths, bond_angles, dihedrals)
Build a chain of atoms using the NeRF algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
init_coords
|
ndarray
|
(3, 3) initial coordinates for the first 3 atoms |
required |
bond_lengths
|
ndarray
|
(N,) bond lengths for atoms 4 to N+3 |
required |
bond_angles
|
ndarray
|
(N,) bond angles (in radians) for atoms 4 to N+3 |
required |
dihedrals
|
ndarray
|
(N,) dihedral angles (in radians) for atoms 4 to N+3 |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
jnp.ndarray: (N+3, 3) coordinates for the entire chain |
Source code in diff_biophys/geometry/nerf.py
position_atom_3d(p1, p2, p3, bond_length, bond_angle_rad, dihedral_angle_rad)
Differentiable NeRF implementation in JAX for a single atom.
Source code in diff_biophys/geometry/nerf.py
kabsch_alignment(P, Q)
Optimal superposition of P onto Q using Kabsch algorithm in JAX.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
P
|
ndarray
|
(N, 3) mobile coordinates |
required |
Q
|
ndarray
|
(N, 3) reference coordinates |
required |
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
tuple[jnp.ndarray, jnp.ndarray]: (3x3 rotation matrix, 3-element translation vector) |