{ .iter() .enumerate() .array_combinations() + .chain( + // Somehow there is no array_combinations_with_replacement in itertools + // ii combinations are not intuitive here, but potentially needed for + // molecules with multiple association sites. + pure_records + .iter() + .enumerate() + .map(|(i, p)| [(i, p), (i, p)]), + ) .map(|[(i1, p1), (i2, p2)]| { let Some(id1) = p1.identifier.as_str(identifier_option) else { return Err(FeosError::MissingParameters(format!( diff --git a/crates/feos/Cargo.toml b/crates/feos/Cargo.toml index 319e98fb1..137532aea 100644 --- a/crates/feos/Cargo.toml +++ b/crates/feos/Cargo.toml @@ -22,7 +22,6 @@ indexmap = { workspace = true } rayon = { workspace = true, optional = true } itertools = { workspace = true } typenum = { workspace = true } -arrayvec = { workspace = true, features = ["serde"] } feos-core = { workspace = true } feos-derive = { workspace = true }