Content-Type: multipart/alternative; boundary="------------000907000605010401050505" --------------000907000605010401050505 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Here is the patch. It is from the write atom block part and replaces "line += " 0 0 0 0 0 0 0 0 0 0 0 0";" at line 265 of the original class. The patched class is appended to the mail too. line += " 0 0 0 0 0 0 0 0 0"; // Set atom id to the mmm field at position 61-63. This field is read by the MDLV2000Reader class to set the atom ID. // If it is null set it to current atom number if (container.getAtom(f).getID() != null) { // try to parse the integer String reactionAtomIDString = container.getAtom(f).getID(); logger.debug("Parsing mapping id: ", reactionAtomIDString); try { int reactionAtomID = Integer.parseInt(reactionAtomIDString); if (reactionAtomID != 0) { line += this.formatMDLInt(reactionAtomID, 3); } } catch (Exception exception) { logger.error("Mapping number ", reactionAtomIDString, " is not an integer."); logger.debug(exception); // if id was no valid integer, set a new one. line += this.formatMDLInt(f + 1, 3); } } else { line += this.formatMDLInt(f + 1, 3); } line += " 0 0"; Andreas Egon Willighagen schrieb: > On Wed, Apr 8, 2009 at 8:28 PM, Andreas Truszkowski wrote: > >> Thanks for the fast reply. My mistake. I think in 1.0.4 the SDFWriter class >> was not there :) >> > > Yes, it is new indeed. > > >> but is in 1.2.0. So i have looked through the SDFWriter >> class and the first two points from my mail can be ignored. But then is the >> point open which concerns the atom IDs. This problem depends on the >> MDLWriter class. >> > > Can you please submit the last point is as patch? By posting the patch > here, as at SourceForge? Then we can have a look at it in a format > that makes it easier to see what changed... > > Egon > > --------------000907000605010401050505 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Here is the patch. It is from the write atom block part and replaces "line += " 0  0  0  0  0  0  0  0  0  0  0  0";" at line 265 of the original class. The patched class is appended to the mail too.

            line += " 0  0  0  0  0  0  0  0  0";
            // Set atom id to the mmm field at position 61-63. This field is read by the MDLV2000Reader class to set the atom ID.
            // If it is null set it to current atom number
            if (container.getAtom(f).getID() != null) {
                // try to parse the integer
                String reactionAtomIDString = container.getAtom(f).getID();
                logger.debug("Parsing mapping id: ", reactionAtomIDString);
                try {
                    int reactionAtomID = Integer.parseInt(reactionAtomIDString);
                    if (reactionAtomID != 0) {
                        line += this.formatMDLInt(reactionAtomID, 3);
                    }
                } catch (Exception exception) {
                    logger.error("Mapping number ", reactionAtomIDString, " is not an integer.");
                    logger.debug(exception);
                    // if id was no valid integer, set a new one.
                    line += this.formatMDLInt(f + 1, 3);
                }
            } else {
                line += this.formatMDLInt(f + 1, 3);
            }
            line += "  0  0";


Andreas

Egon Willighagen schrieb:
On Wed, Apr 8, 2009 at 8:28 PM, Andreas Truszkowski <ATruszkowski@gmx.de> wrote:
  
Thanks for the fast reply. My mistake. I think in 1.0.4 the SDFWriter class
was not there :)
    

Yes, it is new indeed.

  
but is in 1.2.0. So i have looked through the SDFWriter
class and the first two points from my mail can be ignored. But then is the
point open which concerns the atom IDs. This problem depends on the
MDLWriter class.
    

Can you please submit the last point is as patch? By posting the patch
here, as at SourceForge? Then we can have a look at it in a format
that makes it easier to see what changed...

Egon

  

--------------000907000605010401050505--