proteindf_bridge.modeling モジュール¶
- class proteindf_bridge.modeling.Modeling[ソース]¶
ベースクラス:
object- arbitary_rotate_matrix(in_a, in_b)[ソース]¶
Return the rotation matrix R (3x3) such that applying R to in_b yields a vector pointing in the direction of in_a (i.e. R.dot(in_b) is parallel to in_a; see add_methyl/get_NH3 usage, which rotate a template's own reference axis (in_b) onto a real bond direction (in_a)).
Note: prior to this fix, the (1, 2) matrix entry used nx * nz instead of ny * nz, a bug inherited 1:1 by the Rust port (rust/crates/proteindf-bridge/src/modeling.rs, arbitary_rotate_matrix). For a general (non axis-aligned) input pair this produced a non-orthonormal matrix (~1-2% error), not a proper rotation. Fixed here following the standard Rodrigues rotation formula; verified numerically (rotated vector matches the target direction to machine precision, matrix is orthonormal).
- get_ACE(res, next_aa=None)[ソース]¶
テンプレート(ACE-ALA-NME)フォーマット:
HH3[1-3]-CH3-C - N-CA(HA)-C- N-CH3-HH3[1-3] || | | || | O H CB O H