@@ -51,6 +51,7 @@ public void potassiumCarbonate() throws Exception {
5151 IAtomContainer mol = smi ("[K+].[O-]C(=O)[O-].[K+]" );
5252 Abbreviations factory = new Abbreviations ();
5353 factory .add ("[K+].[O-]C(=O)[O-].[K+] K2CO3" );
54+ factory .setContractToSingleLabel (true );
5455 List <Sgroup > sgroups = factory .generate (mol );
5556 assertThat (sgroups .size (), is (1 ));
5657 assertThat (sgroups .get (0 ).getSubscript (), is ("K2CO3" ));
@@ -302,6 +303,7 @@ public void dontOverwriteExistingSgroups() throws Exception {
302303 @ Test public void hclSaltOfEdci () throws Exception {
303304 Abbreviations factory = new Abbreviations ();
304305 factory .add ("CCN=C=NCCCN(C)C EDCI" );
306+ factory .setContractToSingleLabel (true );
305307 IAtomContainer mol = smi ("CCN=C=NCCCN(C)C.Cl" );
306308 List <Sgroup > sgroups = factory .generate (mol );
307309 assertThat (sgroups .size (), is (1 ));
@@ -329,6 +331,7 @@ public void dontOverwriteExistingSgroups() throws Exception {
329331 Abbreviations factory = new Abbreviations ();
330332 factory .add ("ClCCl DCM" );
331333 factory .add ("Cl[Pd]Cl.[Fe+2].c1ccc(P([c-]2cccc2)c2ccccc2)cc1.c1ccc(P([c-]2cccc2)c2ccccc2)cc1 Pd(dppf)Cl2" );
334+ factory .setContractToSingleLabel (true );
332335 IAtomContainer mol = smi (smi );
333336 List <Sgroup > sgroups = factory .generate (mol );
334337 assertThat (sgroups .size (), is (1 ));
@@ -340,6 +343,7 @@ public void dontOverwriteExistingSgroups() throws Exception {
340343 Abbreviations factory = new Abbreviations ();
341344 factory .add ("Cl[Pd]Cl.[Fe+2].c1ccc(P([c-]2cccc2)c2ccccc2)cc1.c1ccc(P([c-]2cccc2)c2ccccc2)cc1 Pd(dppf)Cl2" );
342345 factory .add ("Cl[Pd]Cl PdCl2" );
346+ factory .setContractToSingleLabel (true );
343347 IAtomContainer mol = smi (smi );
344348 List <Sgroup > sgroups = factory .generate (mol );
345349 assertThat (sgroups .size (), is (1 ));
0 commit comments