Yes, I think we are talking about different things.
My use case can be described as having inputs of toluene and
nitrobenzene. They share a benzene ring as common subgraph. The merged
output would be nitrotoluene. But because of symmetry there are multiple
ways to match the subgraph so the outputs would be ortho, para and meta
nitrotoluene.
Another example would be inputs of ethanol and chloroethane. There are 2
possible sub-graphs (corresponding to overlapping methyl and ethyl
fragments) so the results would be 2‐chloroethanol and 3‐chloro‐1‐propanol.
Tim
On 26/11/2016 17:28, John M wrote:
Hmm,
Perhaps I miss understand this seems quite specific (minCommonEdges?).
The add method just adds all unique atom/bonds from one to another. If
you want to keep duplicates.. just clone one of them.
IAtomContainer mola, molb;
IAtomContainer result = new AtomContainer();
result.add(mola);
result.add(molb);
// or to duplicate
result.add(molb.clone());
J
On 26 November 2016 at 17:01, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:
How would that work if there were multiple overlapping subgraphs?
I would imagine you would want something like
IAtomContainerSet SomeHelperClass.merge(IAtomContainer mol1,
IAtomContainer mol2, int minCommonEdges)
Tim
On 26/11/2016 16:56, John M wrote:
No convenience method, curiously addAtom() does a unique check
(so that's safe but inhibits the common case) but addBond(), etc
doesn't.
I'm actually going to update the add(IAtomContainer) method to do
what you need...
John
On 26 November 2016 at 16:39, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:
Given 2 molecules that have potentially overlapping
subgraphs, is there
a simple way to merge into a single structure?
Of course there could potentially be multiple overlapping
subgraphs so I
suppose you would want to generate merged structures for each
one.
Tim
------------------------------------------------------------------------------
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
<mailto:Cdk-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/cdk-user
<https://lists.sourceforge.net/lists/listinfo/cdk-user>
------------------------------------------------------------------------------
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net <mailto:Cdk-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/cdk-user
<https://lists.sourceforge.net/lists/listinfo/cdk-user>
------------------------------------------------------------------------------
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user