recgen

Crates.iorecgen
lib.rsrecgen
version0.1.2
sourcesrc
created_at2023-03-15 09:18:56.395537
updated_at2023-03-19 05:48:06.02478
descriptionRust bindings to ReCGen: Generate virtual compounds based on input structure
homepage
repository
max_upload_size
id810585
size26,592
Qin WAN (rogerwq)

documentation

README

recgen-rust

Rust Wrapper of ReCGen

Logs

  • v0.1.1: Apple M1 dynamically linking
  • v0.1.0: intialized, ecfp-build done

Environmental Variables

  • RECGEN_INCL: header files for compiling
  • RECGEN_LIB: lib files for compiling
  • RECGEN_DB: sqlite database file
  • RECGEN_INPUT: directory where input files exist

Using conda to install openbabel and sqlite3

openbabel requires boost.

conda install -y -c anaconda sqlite 
conda install -y -c conda-forge boost-cpp openbabel
ln -s /Users/qw/miniconda3/envs/openbabel/lib/libboost_iostreams.dylib /usr/local/lib
export RECGEN_INCL=~/miniconda3/envs/openbabel/include
export RECGEN_LIB=~/miniconda3/envs/openbabel/lib

Findings about ReCGen

  • table "_s" includes id, smarts and content of SDF.
  • table "_f" includes id, smarts, fingerprints and number of overlap.

Make building works

from OB2.0 to OB3.0

  • OBElementTable has been removed, use OBElements:: instead
  • OBAtom::GetHvyDegree() (OB 2.x GetHvyValence())
  • The “Unset” methods for molecule, atom and bond flags have been removed, OBMol::UnsetAromaticPerceived() in OB 2.x is now OBMol::SetAromaticPerceived(false).

Code improvement:

WrapSQLit_Base deconstructor try to close the db connection. add a marker is_opened, try to close when it has been opened

About the Databse

what is column nof in the table frag_f?

WrapSQLite.cpp line 162, size of a vector of Overlap from BBMol.GetOverlap

how is Overlap created?

void Insert(deque<ECMol> &frags, int &nn)
bmol.SetOverlapFragments_Ref();
const int ECMol::he2[12]={85,100,101,102,104,105,106,107,108,109,110,111};
// At, Fm, Md, No, Rf, Db, Sg, Bh, Hs, Mt, Ds, Rg
while (tmp.find("[No]") != string::npos) tmp.replace(tmp.find("[No]"), 3, "[A;!R]");
while (tmp.find("[Fm]") != string::npos) tmp.replace(tmp.find("[Fm]"), 4, "a");
while (tmp.find("[Md]") != string::npos) tmp.replace(tmp.find("[Md]"), 4, "[A;R]");
while (tmp.find("[At]") != string::npos) tmp.replace(tmp.find("[At]"), 4, "*");
void ECMol::MkSMARTS(bool AddH) // specific SMART rule
void BBMol::SetOverlapFragments_Ref()
void SetOverlapFragments_Ref(int ele);
void SetOverlapFragments_Ref(string attr, int val);
void SetOverlapFragments_Fra();
Commit count: 0

cargo fmt