|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmol.smiles.SmilesGenerator
public class SmilesGenerator
Double bond, allene, square planar and tetrahedral stereochemistry only not octahedral or trigonal bipyramidal. No attempt at canonicalization -- unnecessary for model searching. see SmilesMatcher and package.html for details Bob Hanson, Jmol 12.0.RC17 2010.06.5
Field Summary | |
---|---|
private int |
atomCount
|
private JmolNode[] |
atoms
|
private BitSet |
bsAromatic
|
private BitSet |
bsBondsDn
|
private BitSet |
bsBondsUp
|
private BitSet |
bsIncludingH
|
private BitSet |
bsSelected
|
private BitSet |
bsToDo
|
private Hashtable |
htRings
|
private Hashtable |
htRingsSequence
|
private int |
nPairs
|
private JmolNode |
prevAtom
|
private JmolNode[] |
prevSp2Atoms
|
private StringBuffer |
ringSets
|
private SmilesSearch.VTemp |
vTemp
|
Constructor Summary | |
---|---|
SmilesGenerator()
|
Method Summary | |
---|---|
private void |
addBracketedBioName(StringBuffer sb,
JmolNode a,
String atomName)
|
private String |
addStereoCheck(int atomIndex,
JmolNode[] stereo,
int i,
String s)
checks a group and either adds a new group to the growing check string or returns null |
private String |
checkStereoPairs(JmolNode atom,
int atomIndex,
JmolNode[] stereo,
int stereoFlag)
|
private void |
dumpRingKeys(StringBuffer sb,
Hashtable ht)
|
(package private) String |
getBioSmiles(JmolNode[] atoms,
int atomCount,
BitSet bsSelected,
boolean allowUnmatchedRings,
boolean addCrossLinks,
String comment)
|
private char |
getBondStereochemistry(JmolEdge bond,
JmolNode atomFrom)
Retrieves the saved character based on the index of the bond. |
private String |
getRingCache(int i0,
int i1,
Hashtable ht)
|
protected static String |
getRingKey(int i0,
int i1)
|
(package private) String |
getSmiles(JmolNode[] atoms,
int atomCount,
BitSet bsSelected)
|
private JmolNode |
getSmiles(StringBuffer sb,
JmolNode atom,
boolean allowConnectionsToOutsideWorld,
boolean allowBranches)
|
private String |
getSmilesComponent(JmolNode atom,
BitSet bs,
boolean allowConnectionsToOutsideWorld)
creates a valid SMILES string from a model. |
private static String |
getStereoFlag(JmolNode atom0,
JmolNode[] atoms,
int nAtoms,
SmilesSearch.VTemp v)
|
private void |
setBondDirections()
Creates global BitSets bsBondsUp and bsBondsDown. |
private String |
sortInorganic(JmolNode atom,
List v)
We must sort the bond vector such that a diaxial pair is first and last. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private JmolNode[] atoms
private int atomCount
private BitSet bsSelected
private BitSet bsAromatic
private StringBuffer ringSets
private SmilesSearch.VTemp vTemp
private int nPairs
private BitSet bsBondsUp
private BitSet bsBondsDn
private BitSet bsToDo
private JmolNode prevAtom
private JmolNode[] prevSp2Atoms
private Hashtable htRingsSequence
private Hashtable htRings
private BitSet bsIncludingH
Constructor Detail |
---|
public SmilesGenerator()
Method Detail |
---|
String getSmiles(JmolNode[] atoms, int atomCount, BitSet bsSelected) throws InvalidSmilesException
InvalidSmilesException
String getBioSmiles(JmolNode[] atoms, int atomCount, BitSet bsSelected, boolean allowUnmatchedRings, boolean addCrossLinks, String comment) throws InvalidSmilesException
InvalidSmilesException
private void addBracketedBioName(StringBuffer sb, JmolNode a, String atomName)
private String getSmilesComponent(JmolNode atom, BitSet bs, boolean allowConnectionsToOutsideWorld) throws InvalidSmilesException
atom
- bs
- allowConnectionsToOutsideWorld
-
InvalidSmilesException
private char getBondStereochemistry(JmolEdge bond, JmolNode atomFrom)
bond
- atomFrom
-
private void setBondDirections()
private JmolNode getSmiles(StringBuffer sb, JmolNode atom, boolean allowConnectionsToOutsideWorld, boolean allowBranches)
private String sortInorganic(JmolNode atom, List v)
atom
- v
-
private String checkStereoPairs(JmolNode atom, int atomIndex, JmolNode[] stereo, int stereoFlag)
private static String getStereoFlag(JmolNode atom0, JmolNode[] atoms, int nAtoms, SmilesSearch.VTemp v)
atom0
- atoms
- nAtoms
- v
-
private String addStereoCheck(int atomIndex, JmolNode[] stereo, int i, String s)
atomIndex
- stereo
- i
- s
-
private String getRingCache(int i0, int i1, Hashtable ht)
private void dumpRingKeys(StringBuffer sb, Hashtable ht)
protected static String getRingKey(int i0, int i1)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |