Hi all,

I'm marking this patch for closure, please let me know of any objections. For those interested you can handle these easily using the connectivity checker (partition in to molecules) or even just use a regular expression to split the input.

final Pattern DOT_BOND = Pattern.compile("\\.");
final SmilesParser parser = new SmilesParser(builder);
String disconnected = "[Na+].[Cl-]";
for(String smiles : DOT_BOND.split(disconnected)){
IAtomContainer part = parser.parseSmiles(smiles);


Begin forwarded message:

From: "John May" <jwmay@users.sf.net>
Subject: [cdk:patches] #581 add handling of disconnected SMILES
Date: 8 February 2013 09:41:20 GMT
To: "[cdk:patches] " <581@patches.cdk.p.re.sf.net>
Reply-To: "[cdk:patches] " <581@patches.cdk.p.re.sf.net>

Marking for closure

[patches:#581] add handling of disconnected SMILES

Status: open
Labels: SMILES
Created: Thu Nov 15, 2012 05:17 PM UTC by Ralf Stephan
Last Updated: Fri Nov 16, 2012 10:31 AM UTC
Owner: nobody

This adds two functions to the SmilesParser API that let users poll disconnected molecules from the formula. The main API only returns a molecule which by def. is connected. Thus, those about ten tests with disconnected input were broken from the start and correctly fail with this code. Updates for tests will follow.

Took me some time to figure out my problem was that individual SmilesParserTests do not create a SmilesParser object (which is unexpected).

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdk/patches/581/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/prefs/