Hi Yannick,
I don’t now about ruby wrappers but can answer 2 and 3. Also looks like rcdk is
used for ruby and R bindings which is a little confusing.
2) IBond is an interface you need to use the concrete class. There are a couple
of way to do this, you can use Bond concrete class (silent package is best)
> Bond.new(mol.getAtom(0), mol.getAtom(1), Order.SINGLE)
use a builder -
> SilentChemObjectBuilder.getInstance().newInstance(IBond.class,
> mol.getAtom(0), mol.getAtom(1), Order.SINGLE)
or use the convince method on the molecule -
> molcule.addBond(0,1, Order.Single);
3-1) CDKHydrogenAdder is only for implicit hydrogens - you only need this if
you have null hydrogen values. For explicit hydrogens use the manipulator.
> AtomContainerManipulator.convertImplicitToExplicitHydrogens(mol)
3-2) You have a SMARTS pattern and so need to use the SMARTSQueryTool. I don’t
think that will be available in the version you are using. Here’s the java code
anyways.
SMARTSQueryTool sqt = new SMARTSQueryTool(“[#8]=[#6]”);
sqt.matches(mol);
for (List<Integer> mapping : sqt.getAllMappings()) {
for (int i = 0; i < mapping.size(); i++) {
System.out.println(mapping.get(i) + 1);
}
}
Hope that helps,
John
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user