"babel" - FP2 Exhaustive Fingerprint Fragments

Q

How to exhaust all possible Open Babel FP2 Fingerprint Fragments in a molecule?

✍: FYIcenter.com

A

The easiest way to exhaust all possible Open Babel FP2 Fingerprint Fragments in a molecule to following this algorithm:

  1. Loop through all atoms (except H) in the molecule.
  2. Set each atom as the root of a bond-atom tree. And loop through all paths of the tree up to 7 atoms.
  3. Examine each path, which is a molecule fragment. If it is a new path, record it. If it is a repeating path, or chemically identical path, ignore it.

Here are some examples of molecule fingerprint fragments:

Fingerprint fragments of "CCCCCCCCCCN" - The output shows 12 fragments. Note that chemically identical fragments are considered as one fragment. For example, "N-C" and "C-N" are chemically identical, so only "N-C", represented as "7 1 6" is record.

fyicenter$ obabel -:CCCCCCCCCCN -o fpt -xs
>
0 6 1 6 <670>
0 6 1 6 1 6 <260>
0 6 1 6 1 6 1 6 <384>
0 6 1 6 1 6 1 6 1 6 <984>
0 6 1 6 1 6 1 6 1 6 1 6 <429>
0 6 1 6 1 6 1 6 1 6 1 6 1 6 <49>
0 7 1 6 <82>
0 7 1 6 1 6 <906>
0 7 1 6 1 6 1 6 <348>
0 7 1 6 1 6 1 6 1 6 <711>
0 7 1 6 1 6 1 6 1 6 1 6 <656>
0 7 1 6 1 6 1 6 1 6 1 6 1 6 <324>

Fingerprint fragments of "CCCCCNCCCCC" - The output shows 18 fragments. It has more fragments, after moving N to the middle of the chain.

fyicenter$ obabel -:CCCCCNCCCCC -o fpt -xs
>
0 6 1 6 <670>
0 6 1 6 1 6 <260>
0 6 1 6 1 6 1 6 <384>
0 6 1 6 1 6 1 6 1 6 <984>
0 6 1 6 1 6 1 7 1 6 1 6 1 6 <13>
0 6 1 6 1 7 1 6 1 6 <609>
0 6 1 6 1 7 1 6 1 6 1 6 <393>
0 6 1 6 1 7 1 6 1 6 1 6 1 6 <797>
0 6 1 7 1 6 <693>
0 6 1 7 1 6 1 6 <9>
0 6 1 7 1 6 1 6 1 6 <948>
0 6 1 7 1 6 1 6 1 6 1 6 <156>
0 6 1 7 1 6 1 6 1 6 1 6 1 6 <276>
0 7 1 6 <82>
0 7 1 6 1 6 <906>
0 7 1 6 1 6 1 6 <348>
0 7 1 6 1 6 1 6 1 6 <711>
0 7 1 6 1 6 1 6 1 6 1 6 <656>

Fingerprint fragments of "C1CCCCC1" - The output shows 6 fragments. The first digit of "1" of the last fragment indicates fragment type of "ring".

fyicenter$ obabel -:C1CCCCC1 -o fpt -xs
>
0 6 1 6 <670>
0 6 1 6 1 6 <260>
0 6 1 6 1 6 1 6 <384>
0 6 1 6 1 6 1 6 1 6 <984>
0 6 1 6 1 6 1 6 1 6 1 6 <429>
1 6 1 6 1 6 1 6 1 6 1 6 <441>

Fingerprint fragments of "C1CCNCC1" - The output shows 16 fragments. It has more fragments, after replace a C with a N on the ring.

fyicenter$ obabel -:C1CCNCC1 -o fpt -xs
>
0 6 1 6 <670>
0 6 1 6 1 6 <260>
0 6 1 6 1 6 1 6 <384>
0 6 1 6 1 6 1 6 1 6 <984>
0 6 1 6 1 7 1 6 1 6 <609>
0 6 1 6 1 7 1 6 1 6 1 6 <393>
0 6 1 7 1 6 <693>
0 6 1 7 1 6 1 6 <9>
0 6 1 7 1 6 1 6 1 6 <948>
0 6 1 7 1 6 1 6 1 6 1 6 <156>
0 7 1 6 <82>
0 7 1 6 1 6 <906>
0 7 1 6 1 6 1 6 <348>
0 7 1 6 1 6 1 6 1 6 <711>
0 7 1 6 1 6 1 6 1 6 1 6 <656>
1 7 1 6 1 6 1 6 1 6 1 6 <668>

Fingerprint fragments of "c1ccccc1" - The output shows 16 fragments. The first digit of "1" of the last fragment indicates fragment type of "aromatic ring".

fyicenter$ obabel -:c1ccccc1 -o fpt -xs
>
0 6 5 6 <81>
0 6 5 6 5 6 <905>
0 6 5 6 5 6 5 6 <347>
0 6 5 6 5 6 5 6 5 6 <710>
0 6 5 6 5 6 5 6 5 6 5 6 <655>
5 6 5 6 5 6 5 6 5 6 5 6 <715>

Fingerprint fragments of "C/1=C/C/C=C\C1" - The output shows a new type of ring "2".

fyicenter$ obabel "-:C/1=C/C/C=C\C1" -o fpt -xs
>
0 6 1 6 <670>
0 6 1 6 1 6 <260>
0 6 1 6 1 6 1 6 1 6 1 6 <429>
0 6 1 6 1 6 2 6 1 6 1 6 <769>
0 6 1 6 2 6 1 6 <182>
0 6 1 6 2 6 1 6 1 6 <303>
0 6 1 6 2 6 1 6 1 6 1 6 <625>
0 6 1 6 2 6 2 6 1 6 1 6 <965>
0 6 2 6 <778>
0 6 2 6 1 6 <58>
0 6 2 6 1 6 1 6 <724>
0 6 2 6 1 6 1 6 1 6 1 6 <554>
0 6 2 6 1 6 1 6 2 6 <267>
0 6 2 6 1 6 1 6 2 6 1 6 <352>
0 6 2 6 1 6 2 6 1 6 1 6 <894>
0 6 2 6 1 6 2 6 2 6 1 6 <692>
0 6 2 6 2 6 1 6 1 6 2 6 <858>
0 6 2 6 2 6 1 6 2 6 1 6 <548>
2 6 1 6 1 6 1 6 1 6 1 6 <453>
2 6 1 6 1 6 2 6 1 6 1 6 <793>
2 6 2 6 1 6 2 6 1 6 1 6 <918>

 

"babel" - FP2 Fingerprint Fragment Ends at Ring

"babel -ofpt -xs" - Display Fingerprint Fragments

Similarity Search with Open Babel

⇑⇑ Open Babel Tutorials

2020-12-02, 1138🔥, 0💬