"babel -i fs ... -s SMILES" - Substructure Search with Index

Q

How to perform a substructure search using the fastsearch index file with the "babel" command?

✍: FYIcenter.com

A

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

babel -i fs index_file output_section -s SMILES

In the above command:

  • "-i fs index_file" - Specifies a fastsearch index file in "fs" format as the intput.
  • "output_section" - Specifies the output in a given format.
  • "-s SMILES" - Specifies the query molecule in SMILES.

Here is an example of substructure search of benzene ring molecule SMILES in a fastsearch index file.

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

210 candidates from fingerprint search phase
[Fe].O(C(=O)c1ccc(NC(=O)[C]2[CH][CH][CH][CH]2)cc1)CC.O(C(=O)c1ccc(NC(=O)[C]2[CH][CH][CH][CH]2)cc1)CC  499518
O(C(=O)c1ccc(NC(=O)[C]2[CH][CH][CH][CH]2)cc1)CC  499519
S(=O)(=O)(O)c1c2c(c(S(=O)(=O)O)ccc2Nc2cc3c(nc2C)c(OC)cc([N+](=O)[O-])c3OC)cc(S(=O)(=O)O)c1  499522
[nH]1c2c(NCCN(C)C)ncnc2nc1c1cc2c(cc1)cccc2  499528
N(CCN(C)C)c1nc(nc2nc[nH]c12)c1cc2c(cc1)cccc2  499529
[Co+2].ClCC[NH+](CCN)CCCl.[S-]C(=S)N(CC)CC.[S-]C(=S)N(CC)CC.c1(ccccc1)[B-](c1ccccc1)(c1ccccc1)c1ccccc1  499531
[Co+2].ClCCN(c1cc(N)c(N)cc1)CCCl.[S-]C(=S)N(CC)CC.[S-]C(=S)N(CC)CC  499532
O(N=C1C2(C(C3C(CC2)c2c(CC3)cc(OC)cc2)CC1)C)CCN1CCCCC1  499539
[Ni+2].[S-]CCP(c1ccccc1)c1ccccc1.[S-]CCP(c1ccccc1)c1ccccc1  499544
SCCP(c1ccccc1)c1ccccc1  499545
...
O=C(c1cc2CCCCc2cc1)C[n+]1ccncc1  499990
[P+](C1c2c(c3c1cccc3)cccc2)(c1ccccc1)(c1ccccc1)c1ccccc1  499996
Brc1[n+](Cc2c(C[n+]3c(Br)cccc3)cccc2)cccc1  499997
Brc1[n+](Cc2cc(C[n+]3c(Br)cccc3)ccc2)cccc1  499998
Fc1c2c(C(=O)N(C(c3ccccc3)C)C2=O)c(F)c(F)c1F  499999
208 molecules converted
7241 audit log messages 

Here is an example of the same substructure search as above with resulting molecules saved in a file.

fyicenter$ babel -i fs molecules-index.fs -o smiles result.smi -s 'c1ccccc1' 

210 candidates from fingerprint search phase
208 molecules converted
7241 audit log messages

fyicenter$ head result.smi 
[Fe].O(C(=O)c1ccc(NC(=O)[C]2[CH][CH][CH][CH]2)cc1)CC.O(C(=O)c1ccc(NC(=O)[C]2[CH][CH][CH][CH]2)cc1)CC  499518
O(C(=O)c1ccc(NC(=O)[C]2[CH][CH][CH][CH]2)cc1)CC  499519
S(=O)(=O)(O)c1c2c(c(S(=O)(=O)O)ccc2Nc2cc3c(nc2C)c(OC)cc([N+](=O)[O-])c3OC)cc(S(=O)(=O)O)c1  499522
[nH]1c2c(NCCN(C)C)ncnc2nc1c1cc2c(cc1)cccc2  499528
N(CCN(C)C)c1nc(nc2nc[nH]c12)c1cc2c(cc1)cccc2  499529
[Co+2].ClCC[NH+](CCN)CCCl.[S-]C(=S)N(CC)CC.[S-]C(=S)N(CC)CC.c1(ccccc1)[B-](c1ccccc1)(c1ccccc1)c1ccccc1  499531
[Co+2].ClCCN(c1cc(N)c(N)cc1)CCCl.[S-]C(=S)N(CC)CC.[S-]C(=S)N(CC)CC  499532
O(N=C1C2(C(C3C(CC2)c2c(CC3)cc(OC)cc2)CC1)C)CCN1CCCCC1  499539
[Ni+2].[S-]CCP(c1ccccc1)c1ccccc1.[S-]CCP(c1ccccc1)c1ccccc1  499544
SCCP(c1ccccc1)c1ccccc1  499545

Note that the substructure search command with index file is identical with the similarity search with index file, except that the similarity search has an extra option "-at ..." to specify the top similarity selection criteria.

 

"babel -i fs ... -s query_file" - Substructure Search

"Difficulty opening ..." Error Using Fastsearch Index

Using Fastsearch Fingerprint Index

⇑⇑ Open Babel Tutorials

2020-05-25, 213👍, 0💬