It should be a simple patch to add to that fingerprint if you feel up it? I
should remove the SMARTSQueryTool from there but it's too bad to use it.
For matching multiple patterns the existing binary fingerprint should be
doing it right, MMFFAtomTyperMatcher also has an example
<https://github.com/cdk/cdk/blob/master/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java>
.
Essentially use VentoFoggia (VF):
Pattern ptrn = VentoFoggia.findSubstructure(qry);
int numHits = ptrn.matchAll(ref).uniqueAtoms().count();
J
Regards,
John W May
john.wilkinson...@gmail.com
On 19 May 2016 at 20:07, Yannick .Djoumbou <y.djoum...@gmail.com> wrote:
> Hi John,
>
> Thanks for your quick reply. If I want to use a customized
> ICountFingerprint like data structure, I could just use the SMARTSQuerytool
> and call the countMatches() function, especially if I want to match many
> patterns against the same molecule. Do you have a more efficient way to do
> it?
>
> Best,
>
>
>
> On Thu, May 19, 2016 at 1:28 AM, John M <john.wilkinson...@gmail.com>
> wrote:
>
>> Hi Yannick,
>>
>> Count fingerprints are only supported on a subset of fingerprints
>> (ECFP/Signature IIRC) and you must use binary for the others. Although it's
>> possible to support it here in theory, there are some pathological SMARTS
>> queries that take a very long time to count but are quick to match once.
>> Example would be a pladium/phenyl reagent e.g. Pd(PPh3)3 or something.
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 19 May 2016 at 07:12, Yannick .Djoumbou <y.djoum...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I have an issue with the ICountFingerprint in CDK.
>>> When I use the created SubstructureFingerprinter to generate
>>> IBitFingerprint,
>>> I manage to get the list of patterns that are present in any given query
>>> molecule.
>>> however, when I instead tried to use the ICountFingerprint as in:
>>>
>>> IAtomContainer mol =
>>>
>>> sp.parseSmiles("CCC(C)C(=O)N(C)C(C)C(=O)OC1CCCCCCC(C)CCC(N)(O)C(CCCC(C)CCCC(CCl)NC(=O)C1)OC");
>>> SubstructureFingerprinter sf = new SubstructureFingerprinter();
>>> ICountFingerprint countFingerprint1 = sf.getCountFingerprint(mol);
>>> ICountFingerprint countFingerprint1 = sf.getCountFingerprint(mol);
>>>
>>> The last line causes the following error:
>>>
>>> Exception in thread "main" java.lang.UnsupportedOperationException
>>>
>>> at
>>> org.openscience.cdk.fingerprint.SubstructureFingerprinter.getCountFingerprint(
>>> SubstructureFingerprinter.java:449)
>>>
>>> at wishartlab.biotransformer.utils.StructureSimilarity.main(
>>> StructureSimilarity.java:203)
>>>
>>>
>>>
>>>
>>> This also occurs when I create a SubstructureFingerprinter with a custom
>>> array of smarts.
>>>
>>>
>>> Has anyone encountered this issue? How can I solve it? I am using CDK
>>> 1.5.12.
>>>
>>> Thanks for the help.
>>>
>>> Regards,
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Mobile security can be enabling, not merely restricting. Employees who
>>> bring their own devices (BYOD) to work are irked by the imposition of MDM
>>> restrictions. Mobile Device Manager Plus allows you to control only the
>>> apps on BYO-devices by containerizing them, leaving personal data
>>> untouched!
>>> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
>>> _______________________________________________
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>>>
>>
>
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user