Thank you for pointing out that such functionality is missing. Indigo
1.0.0 doesn't have such functionality but I have prepared
Indigo-1.1-alpha1 release where such functionality was added. You can
download this release from our site: http://ggasoftware.com/download
Please note that there is a new section with unstable releases on that page.
In this Indigo version there are 3 new methods for reaction:
atomMappingNumber, setAtomMappingNumber, and clearAAM. With these
methods you can retrieve and modify reaction atom-atom mapping, and
clear it at all if necessary.
Code example is following:
IndigoObject rxn = indigo.loadReaction("CCCCCCC>>CCCCCCCO");
rxn.automap("discard");
System.out.println(rxn.smiles());
IndigoObject reactant1 = rxn.iterateReactants().next();
IndigoObject atom1 = reactant1.getAtom(0);
// atomMappingNumber returns 0 if there is no mapping on this atom
System.out.println(rxn.atomMappingNumber(atom1));
// You can remove mapping on this atom
rxn.setAtomMappingNumber(atom1, 0);
System.out.println(rxn.smiles());
// Or specity any other mapping number
rxn.setAtomMappingNumber(atom1, 3);
System.out.println(rxn.smiles());
// Or even remove all atom-atom mapping information
rxn.clearAAM();
System.out.println(rxn.smiles());
Let me know if something if working not as expected.
With best regards,
Mikhail Rybalkin
Glad to hear that addition is useful! And I forget to say that Indigo
mapping object cannot be used for reaction atom-to-atom mapping because
it is not restricted that all atom mapping numbers are unique. For
example automap for reaction C1CCCC1>>C1CCCC1.C1CCCC1 will produce
[CH2:1]1[CH2:5][CH2:4][CH2:3][CH2:2]1>>[CH2:1]1[CH2:5][CH2:4][CH2:3][CH2:2]1.[CH2:1]1[CH2:5][CH2:4][CH2:3][CH2:2]1.
Thank you very much for the bug report. We will try to fix that issue,
but can you describe with what Indigo objects are you working in order
to understand where to dig. We had similar issues with Java finalizers
before. Attached log contains only the information that this fatal error
occurred, but there is quite low additional information about the nature
of this bug. Could you describe in what way are you working with Indigo,
may some scenario or similar. Such information will be very helpful.
--
Mikhail
On the topic of bugs i've found a small bug in the way foldhydrogens interacts with the reaction mapper
public static void main(String[] args) {
Indigo indigo= Utils.indigo;
IndigoObject reaction = indigo.createReaction();
}
public static Indigo indigo = new Indigo();
Such behavior was designed: there is Indigo instance with options collection and additional plugins (at this moment only renderer) that add options to the Indigo. IndigoRenderer is a plugin, but not an object in fact; it extends Indigo functionality.Indigo indigo = new Indigo(); indigo.setOption("render-output-format", "png"); new IndigoRenderer(indigo); produces an error "option manager: Property "render-output-format" not defined" Whilst Indigo indigo = new Indigo(); new IndigoRenderer(indigo); indigo.setOption("render-output-format", "png"); works as expected.
> I don't actually have an AMD processor (Intel core2duo).
I have notices "windows-amd64" string in your crash log file:
http://wwmm.ch.cam.ac.uk/~dl387/temp/hs_err_pid3012.log
But it doesn't matter. Maybe this means something else.
> By the way if it is not a significant undertaking, would it be
> possible for future alpha releases to include the Universal Java API?
Yes, of course. I'll add the universal build on friday (maybe with some
bugs fixed).
On 6/23/2011 23:27, Daniel Lowe wrote:
I have publish indigo-1.1-alpha2 with universal.
Fixed:
1. foldHydrogens on [H][H] and molecules with isotopic hydrogens ([2H]C)
2. reaction layout for reactions with empty reactants
3. saving molecule with s-group into molfile format.
4. substructure matcher with special query with recursive smarts
beginning with hydrogen
A bit later after more testing this fixes will be integrated into the
stable branch, and more detailed announcement will be made.
Thank you for sending bug reports!
With best regards,
Mikhail Rybalkin