This repository was archived by the owner on Jul 10, 2024. It is now read-only.
Commit ff94462 1 parent 13223ba commit ff94462 Copy full SHA for ff94462
File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 37
37
this version date should be updated only when the underlying
38
38
hash will change!
39
39
-->
40
- <property name =" version" value =" 20160823 " />
40
+ <property name =" version" value =" 20170222 " />
41
41
<echo file =" src/lychi/Version.java" >package lychi;
42
42
public final class Version {
43
43
public static final String VERSION = "${ version } ";
Original file line number Diff line number Diff line change @@ -2557,16 +2557,26 @@ int chargeBalance (Molecule mol) {
2557
2557
for (int i = 0 ; i < atoms .length ; ++i ) {
2558
2558
int ch = atoms [i ].getCharge ();
2559
2559
int hc = atoms [i ].getImplicitHcount ();
2560
- if (atoms [i ].getAtno () == 8 && hc > 0 && ch == 0 ) {
2561
- cand .add (i );
2560
+ switch (atoms [i ].getAtno ()) {
2561
+ case 8 : // O
2562
+ case 17 : // Cl
2563
+ case 35 : // Br
2564
+ case 53 : // I
2565
+ if (hc > 0 && ch == 0 ) {
2566
+ cand .add (i );
2567
+ }
2568
+ break ;
2562
2569
}
2563
2570
}
2564
2571
2565
2572
while (net > 0 && !cand .isEmpty ()) {
2566
2573
int minrank = Integer .MAX_VALUE ;
2567
2574
Integer atom = null ;
2568
2575
for (Integer a : cand ) {
2569
- if (rank [a ] < minrank ) {
2576
+ if (rank [a ] < minrank
2577
+ || (rank [a ] == minrank
2578
+ && atoms [a ].getAtno ()
2579
+ < atoms [atom ].getAtno ())) {
2570
2580
minrank = rank [a ];
2571
2581
atom = a ;
2572
2582
}
You can’t perform that action at this time.
0 commit comments