Skip to content

Commit

Permalink
changed get_most_common_isotope_mass to getMostCommonIsotopeMass whic…
Browse files Browse the repository at this point in the history
…h avoids rewriting the function
  • Loading branch information
mvisani committed Oct 10, 2024
1 parent 0ba7715 commit 746568a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion rdkit-sys/src/bridge/periodic_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
pub mod ffi {
unsafe extern "C++" {
include!("wrapper/include/periodic_table.h");
type PeriodicTable;
pub fn get_valence_list(atomic_number: u32) -> &'static CxxVector<i32>;
pub fn get_most_common_isotope_mass(atom: &CxxString) -> f64;
pub fn getMostCommonIsotopeMass(self: &PeriodicTable, atom: &CxxString) -> f64;
}
}
3 changes: 2 additions & 1 deletion rdkit-sys/wrapper/include/periodic_table.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once

#include "rust/cxx.h"
#include <rdkit/GraphMol/PeriodicTable.h>

namespace RDKit {
const std::vector<int> &get_valence_list(unsigned int atomic_number);
double get_most_common_isotope_mass(const std::string &symbol);
// double get_most_common_isotope_mass(const std::string &symbol);
} // namespace RDKit
8 changes: 4 additions & 4 deletions rdkit-sys/wrapper/src/periodic_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const std::vector<int> &get_valence_list(unsigned int atomic_number) {
return pt->getValenceList(atomic_number);
}

double get_most_common_isotope_mass(const std::string &symbol) {
PeriodicTable *pt = RDKit::PeriodicTable::getTable();
return pt->getMostCommonIsotopeMass(symbol);
}
// double get_most_common_isotope_mass(const std::string &symbol) {
// PeriodicTable *pt = RDKit::PeriodicTable::getTable();
// return pt->getMostCommonIsotopeMass(symbol);
// }
} // namespace RDKit

0 comments on commit 746568a

Please sign in to comment.