Permalink
Browse files

Added some more elements to the valence table

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information...
1 parent fe8538f commit 0629d8e2539c79161d92ccce2ff27c1a07d2a6f2 @rajarshi rajarshi committed with egonw Feb 3, 2011
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/main/org/openscience/cdk/qsar/AtomValenceTool.java
@@ -21,11 +21,11 @@
*/
package org.openscience.cdk.qsar;
+import org.openscience.cdk.interfaces.IAtom;
+
import java.util.HashMap;
import java.util.Map;
-import org.openscience.cdk.interfaces.IAtom;
-
/**
* This class returns the valence of an atom.
*
@@ -41,8 +41,15 @@
public static int getValence(IAtom atom) {
if (valencesTable == null) {
- valencesTable = new HashMap<String,Integer>();
+ valencesTable = new HashMap<String, Integer>();
valencesTable.put("H", 1);
+ valencesTable.put("He", 8);
+ valencesTable.put("Ne", 8);
+ valencesTable.put("Ar", 8);
+ valencesTable.put("Kr", 8);
+ valencesTable.put("Xe", 8);
+ valencesTable.put("Hg", 2);
+ valencesTable.put("Rn", 8);
valencesTable.put("Li", 1);
valencesTable.put("Be", 2);
valencesTable.put("B", 3);

0 comments on commit 0629d8e

Please sign in to comment.