4 releases

0.0.4 Oct 15, 2020
0.0.3 Oct 15, 2020
0.0.2 Oct 15, 2020
0.0.1 Oct 15, 2020
Download history 35/week @ 2023-02-14 25/week @ 2023-02-21 12/week @ 2023-02-28 18/week @ 2023-03-07 21/week @ 2023-03-14 7/week @ 2023-03-21 14/week @ 2023-03-28 8/week @ 2023-04-04 19/week @ 2023-04-11 22/week @ 2023-04-25 15/week @ 2023-05-02 14/week @ 2023-05-09 10/week @ 2023-05-16 6/week @ 2023-05-23 30/week @ 2023-05-30

64 downloads per month
Used in 5 crates (3 directly)

MIT license

8KB
72 lines

dihedral

crates.io crates.io crates.io docs.rs

This crate provides functions for working with dihedral angles. Currently, there are two functions:

  • dihedral calculates the dihedral angle in the range -π to π in accordance with biochemistry textbooks (see also: https://en.wikipedia.org/wiki/Dihedral_angle#In_stereochemistry)
  • dihedral_unsigned ignores the direction of rotation and outputs the angle within the range 0 to π. This function is faster than the above signed version.

lib.rs:

Dihedral

crates.io crates.io crates.io

This crate provides functions for working with dihedral angles. Currently, there are two functions:

  • dihedral calculates the dihedral angle in the range -π to π in accordance with biochemistry textbooks (see also: https://en.wikipedia.org/wiki/Dihedral_angle#In_stereochemistry)
  • dihedral_unsigned ignores the direction of rotation and outputs the angle within the range 0 to π. This function is faster than the above signed version.

If you want to use f32 instead of f64 for calculation, you can add dihedral = {version = "*", features = ["f32"]} to your Cargo.toml.

References

No runtime deps

Features

  • f32