Skip to content

Commit

Permalink
[restructured] all main changes to add bond-atom triplets and bond-ce…
Browse files Browse the repository at this point in the history
…ntered spherical decomposition
  • Loading branch information
liam-o-marsh committed Oct 24, 2023
1 parent ebff16d commit fd77379
Show file tree
Hide file tree
Showing 17 changed files with 3,404 additions and 27 deletions.
911 changes: 911 additions & 0 deletions rascaline/src/calculators/bondatom_neighbor_list.rs

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions rascaline/src/calculators/descriptors_by_systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,13 @@ pub fn split_tensor_map_by_system(descriptor: &mut TensorMap, n_systems: usize)
let mut structure_per_sample = vec![LabelValue::new(-1); block_data.samples.count()];

let system_start = *system_end;
for (sample_i, &[structure, center]) in block_data.samples.iter_fixed_size().enumerate().skip(system_start) {
for (sample_i, sample_label) in block_data.samples.iter().enumerate().skip(system_start) {
let structure = sample_label[0];
structure_per_sample[sample_i] = structure;

if structure.usize() == system_i {
// this sample is part of to the current system
samples.add(&[structure, center]);
samples.add(sample_label);
let new_sample = samples_mapping.len();
samples_mapping.insert(sample_i, new_sample);

Expand Down
5 changes: 5 additions & 0 deletions rascaline/src/calculators/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ pub use self::sorted_distances::SortedDistances;
mod neighbor_list;
pub use self::neighbor_list::NeighborList;

mod bondatom_neighbor_list;
pub use self::bondatom_neighbor_list::BANeighborList;

mod radial_basis;
pub use self::radial_basis::{RadialBasis, GtoRadialBasis};

Expand All @@ -93,6 +96,8 @@ pub(crate) use self::descriptors_by_systems::{array_mut_for_system, split_tensor
pub mod soap;
pub use self::soap::{SphericalExpansionByPair, SphericalExpansionParameters};
pub use self::soap::SphericalExpansion;
pub use self::soap::{SphericalExpansionForBondType, SphericalExpansionForBondsParameters};
pub use self::soap::SphericalExpansionForBonds;
pub use self::soap::{SoapPowerSpectrum, PowerSpectrumParameters};
pub use self::soap::{SoapRadialSpectrum, RadialSpectrumParameters};

Expand Down
6 changes: 6 additions & 0 deletions rascaline/src/calculators/soap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ pub use self::cutoff::RadialScaling;
mod spherical_expansion_pair;
pub use self::spherical_expansion_pair::{SphericalExpansionByPair, SphericalExpansionParameters};

mod spherical_expansion_bondcentered_pair;
pub use self::spherical_expansion_bondcentered_pair::{SphericalExpansionForBondType, SphericalExpansionForBondsParameters};

mod spherical_expansion;
pub use self::spherical_expansion::SphericalExpansion;

mod spherical_expansion_bondcentered;
pub use self::spherical_expansion_bondcentered::SphericalExpansionForBonds;

mod power_spectrum;
pub use self::power_spectrum::{SoapPowerSpectrum, PowerSpectrumParameters};

Expand Down
Loading

0 comments on commit fd77379

Please sign in to comment.