MCPcopy Create free account
hub / github.com/dftlibs/numgrid / angular_grid

Function angular_grid

src/lebedev.rs:6–21  ·  view source on GitHub ↗
(num_points: usize)

Source from the content-addressed store, hash-verified

4
5#[pyfunction]
6pub fn angular_grid(num_points: usize) -> (Vec<(f64, f64, f64)>, Vec<f64>) {
7 let offsets = tables::offsets::offsets();
8
9 let offset: usize = match offsets.get(&num_points) {
10 Some(v) => *v,
11 None => panic!(
12 "angular_grid called with unsupported num_points, allowed are: {:?}",
13 valid_input_values()
14 ),
15 };
16
17 (
18 tables::coordinates::COORDINATES[offset..(offset + num_points)].to_vec(),
19 tables::weights::WEIGHTS[offset..(offset + num_points)].to_vec(),
20 )
21}
22
23pub fn get_closest_num_angular(n: usize) -> usize {
24 for number in valid_input_values() {

Callers 1

atom_gridFunction · 0.70

Calls 1

offsetsFunction · 0.85

Tested by

no test coverage detected