Package org.jmol.adapter.readers.quantum
Class NBOParser
- java.lang.Object
-
- org.jmol.adapter.readers.quantum.NBOParser
-
public class NBOParser extends Object
-
-
Constructor Summary
Constructors Constructor Description NBOParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconnectNBO(int modelIndex, String type)private static voiddumpMatrix(String nrtType, int index, int[][] matrix)javajs.util.Lst<Object>getAllStructures(String output, javajs.util.Lst<Object> list)private static intgetAtomIndex(String xx99)private StringgetBlock(String output, String key)private StringgetData(String output, String start, String end, int n)StringgetNBOAtomLabel(Atom a)get thestatic Map<String,Object>getStructureMap(javajs.util.Lst<Object> structureList, String type, int index)Find the map for a specified structure, producing a structure that can be used to generate lone pairs and bonds for a Lewis structureintgetStructures(String data, String nrtType, javajs.util.Lst<Object> list)Reads the $NRTSTR $NRTSTRA, $NRTSTRB, and $CHOOSE blocks.static voidgetStructures46(String[] tokens, String type, javajs.util.Lst<Object> structures, int nAtoms)Use the .46 file NBO alpha/beta labels to identify bonds, lone pairs, and lone valences.private voidgetStructuresTOPO(String data, String nrtType, javajs.util.Lst<Object> list)booleanisOpenShell()NBOParserset(Viewer vwr)private booleansetJmolLewisStructure(Map<String,Object> structureMap, int modelIndex, int resNo)Starting with a structure map, do what needs to be done to change the current Jmol structure to that in terms of bonding and formal charge.
-
-
-
Field Detail
-
vwr
private Viewer vwr
-
haveBeta
private boolean haveBeta
-
-
Method Detail
-
getAllStructures
public javajs.util.Lst<Object> getAllStructures(String output, javajs.util.Lst<Object> list)
-
getStructures46
public static void getStructures46(String[] tokens, String type, javajs.util.Lst<Object> structures, int nAtoms)
Use the .46 file NBO alpha/beta labels to identify bonds, lone pairs, and lone valences.- Parameters:
tokens-type-structures-nAtoms-
-
getAtomIndex
private static int getAtomIndex(String xx99)
-
getStructuresTOPO
private void getStructuresTOPO(String data, String nrtType, javajs.util.Lst<Object> list)
-
dumpMatrix
private static void dumpMatrix(String nrtType, int index, int[][] matrix)
-
getStructures
public int getStructures(String data, String nrtType, javajs.util.Lst<Object> list)
Reads the $NRTSTR $NRTSTRA, $NRTSTRB, and $CHOOSE blocks. Creates a Lst of Hashtables- Parameters:
data- NBO output block not including $ENDnrtType- "CHOOSE", "NRTSTRA", "NRTSTRB"list- to fill- Returns:
- number of structures found or -1 for an error
-
isOpenShell
public boolean isOpenShell()
-
getStructureMap
public static Map<String,Object> getStructureMap(javajs.util.Lst<Object> structureList, String type, int index)
Find the map for a specified structure, producing a structure that can be used to generate lone pairs and bonds for a Lewis structure- Parameters:
structureList- a list of structural information from this class created from an NBO filetype- topoa, topob, nrtstra, nrtstrb, alpha, beta -- last two are from CHOOSEindex- 0-based index for this type- Returns:
- Hashtable or null
-
connectNBO
public boolean connectNBO(int modelIndex, String type)- Parameters:
modelIndex-type- one of alpha|beta|choosea|chooseb|nrtstr_n|nrtstra_n|topo_n|topoa_n| topob_n- Returns:
- true if successful
-
setJmolLewisStructure
private boolean setJmolLewisStructure(Map<String,Object> structureMap, int modelIndex, int resNo)
Starting with a structure map, do what needs to be done to change the current Jmol structure to that in terms of bonding and formal charge. Three map configurations are supported: bond/lone/3c data from $CHOOSE or $NRTSTR, $NRTSTRA, or $NRTSTRB matrix from TOPO map of atom names from the .46 file NBO alpha/beta lists- Parameters:
structureMap-modelIndex-resNo-- Returns:
- true if successful
-
-