"babel -i fs ... -s ... -at n" - Top n Similarity Search

Q

How to perform a top 10 similarity search using the fastsearch index file with the "babel" command?

✍: FYIcenter.com

A

If you want to perform a top n similarity search using the fastsearch index file, you can use the following "babel" command syntax:

babel -i fs index_file output_section -s query_molecule -at n -aa

In the above command:

  • "-i fs index_file" - Specifies a fastsearch index file in "fs" format as the input.
  • "output_section" - Specifies the output in a given format.
  • "-s query_molecule" - Specifies the query molecule.
  • "-at n" - Tells "babel" to perform a similarity search, and outputs n molecules with highest similarity score.
  • "-aa" - Adds similarity score to the molecule title field.

Here is an example of similarity search of benzene ring molecule file in a fastsearch index file. Only 10 molecules with highest similarity scores are generated.

fyicenter$ babel -i fs molecules-index.fs -o smiles -s benzene.sdf -at 10 -aa

[Pb+2].Sc1c(S)cccc1.Sc1c(S)cccc1  499562 0.4
[Sn+2].Sc1c(S)cccc1.Sc1c(S)cccc1  499561 0.4
[Mn].F[B-](F)(F)F.Oc1ccc(O)cc1.[OH]#[C-].[OH]#[C-].[OH]#[C-]  499590 0.315789
[Pt](Cl)(Cl)(Cl)Cl.n1c2c(cccc2)ccc1.N  499708 0.222222
[Co].n1c2c3ncccc3ccc2ccc1.n1c2c3ncccc3ccc2ccc1.n1c2c3ncccc3ccc2ccc1  499660 0.2
[Mn].F[B-](F)(F)F.[OH]#[C-].[OH]#[C-].[OH]#[C-].C([C]1[CH][CH][CH][CH][CH]1)c1ccccc1  499593 0.181818
[Mn].P(c1ccccc1)(c1ccccc1)c1ccccc1.F[B-](F)(F)F.[OH]#[C-].[OH]#[C-].[CH]1[CH][CH][CH][CH][CH]1  499592 0.176471
[Pt+2].[PH+](CC[NH-])(c1ccccc1)c1ccccc1.[PH+](CC[NH-])(c1ccccc1)c1ccccc1  499566 0.176471
SCCP(c1ccccc1)c1ccccc1  499545 0.176471
[Ni+2].[S-]CCP(c1ccccc1)c1ccccc1.[S-]CCP(c1ccccc1)c1ccccc1  499544 0.171429
10 molecules converted
393 audit log messages 

Here is an example of similarity search of benzene ring molecule SMILES in a fastsearch index file. Only 10 molecules with highest similarity scores are generated.

fyicenter$ babel -i fs molecules-index.fs -o smiles -s 'c1ccccc1' -at 10 -aa

[Pb+2].Sc1c(S)cccc1.Sc1c(S)cccc1  499562 0.4
[Sn+2].Sc1c(S)cccc1.Sc1c(S)cccc1  499561 0.4
[Mn].F[B-](F)(F)F.Oc1ccc(O)cc1.[OH]#[C-].[OH]#[C-].[OH]#[C-]  499590 0.315789
[Pt](Cl)(Cl)(Cl)Cl.n1c2c(cccc2)ccc1.N  499708 0.222222
[Co].n1c2c3ncccc3ccc2ccc1.n1c2c3ncccc3ccc2ccc1.n1c2c3ncccc3ccc2ccc1  499660 0.2
[Mn].F[B-](F)(F)F.[OH]#[C-].[OH]#[C-].[OH]#[C-].C([C]1[CH][CH][CH][CH][CH]1)c1ccccc1  499593 0.181818
[Mn].P(c1ccccc1)(c1ccccc1)c1ccccc1.F[B-](F)(F)F.[OH]#[C-].[OH]#[C-].[CH]1[CH][CH][CH][CH][CH]1  499592 0.176471
[Pt+2].[PH+](CC[NH-])(c1ccccc1)c1ccccc1.[PH+](CC[NH-])(c1ccccc1)c1ccccc1  499566 0.176471
SCCP(c1ccccc1)c1ccccc1  499545 0.176471
[Ni+2].[S-]CCP(c1ccccc1)c1ccccc1.[S-]CCP(c1ccccc1)c1ccccc1  499544 0.171429
10 molecules converted
393 audit log messages 

 

"babel -i fs ... -s ... -at score_range" - Similarity Search

"babel -i fs ..." - Fingerprint Index Based Search

Using Fastsearch Fingerprint Index

⇑⇑ Open Babel Tutorials

2020-08-25, 718🔥, 0💬