| Client Algorithms |
Atom Types Fingerprints
The considered Atom Types are:
| Atom Type |
|---|
| sp3 Carbon |
| sp2 Carbon |
| sp Carbon |
| aromatic Carbon |
| Carbon cation |
| sp3 Nitrogen |
| sp2 Nitrogen |
| sp Nitrogen |
| aromatic Nitrogen |
| amide Nitrogen |
| sp3 Nitrogen positively charged |
| sp3 Oxygen |
| sp2 Oxygen |
| Oxygen in carboxylic and phosphoric acid |
| sp3 Sulfur |
| sp2 Sulfur |
| Sulfoxide Sulfur |
| Sulfone Sulfur |
| Hydrogen |
| Fluorine |
| Chlorine |
| Bromine |
| Iodine |
template <class Molecule>
struct pka_fingerprint {
pka_fingerprint(const molecule_t& m, size_t max_length = 5);
bool operator()(size_t v);
const std::vector<size_t>&
get_fingerprint();
};
// for the atom types : #include <morpho/cdl/fingerprints/sybyl_typing.hpp> // for the pka_fingerprint functor : #include <morpho/cdl/fingerprints/pka_fp.hpp>
int main() {
typedef molecule<> M;
typedef M::atom_type atype;
typedef AtomProperty<atomic_numberS,atype>::result_type ANum;
ANum N(7);
std::basic_istream<char, std::char_traits<char> >::pos_type pos;
while(cin.good()) {
pos=std::cin.tellg();
if ( !morpho::look_ahead(std::cin,4)) break;
std::cin.seekg(pos);
nail_juice<> j;
std::map<std::string, std::vector<std::string> > n_props;
get_juice_from_stream(std::cin, j, 0, sdf_formatT(),&n_props);
M m(j,true);
M::vertex_iterator vi,vi_end;
tie(vi,vi_end) = m.vertices();
while(vi!=vi_end) {
if( AtomProperty<atomic_numberS,atype>::get(m.get_atom(*vi))==N ) {
pka_fingerprint<M> FP(m);
FP(*vi);
std::copy(FP.get_fingerprint().begin(),FP.get_fingerprint().end(),std::ostream_iterator<size_t>(cout," "));
std::cout << std::endl;
break;
}
++vi;
}
}
return 0;
}