# Class TopoCifParser

java.lang.Object
org.jmol.adapter.readers.cif.TopoCifParser

public class TopoCifParser extends Object
see https://github.com/COMCIFS/TopoCif Basic idea: We have TLinks, TNodes, and TAtoms TLinks each have two TNodes and may also be associated with bridging TAtom sets. TNode extends TAtom and may also maintain a list of TAtoms. TAtoms extend Atom and may have symmetry aspects.

Author:
  Bob Hanson hansonr@stolaf.edu 2020.11.17 2021.05.07

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`LINK_TYPE_AROM`
`static final int`
`LINK_TYPE_BITS`
`static final int`
`LINK_TYPE_DELO`
`static final int`
`LINK_TYPE_DOUBLE`
`static final int`
`LINK_TYPE_GENERIC_LINK`
types set by filter TOPOSE_TYPES in the format of one or more of {v, vw, hb} separated by "+"; default is v+hb
`static final int`
`LINK_TYPE_HBOND`
`static final int`
`LINK_TYPE_OCTUPLE`
`static final int`
`LINK_TYPE_OTHER`
`static final int`
`LINK_TYPE_PI`
`static final int`
`LINK_TYPE_POLY`
`static final int`
`LINK_TYPE_QUADRUPLE`
`static final int`
`LINK_TYPE_QUINTUPLE`
`static final int`
`LINK_TYPE_SEPTUPLE`
`static final int`
`LINK_TYPE_SEXTUPLE`
`static final int`
`LINK_TYPE_SINGLE`
`static final int`
`LINK_TYPE_TRIPLE`
`static final int`
`LINK_TYPE_VDW`
`static String`
`linkTypes`

## Constructor Summary

Constructors
Constructor
Description
`TopoCifParser()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`finalizeReader()`
PRIOR to symmetry application, process all internal symop/translation aspects.
`void`
`finalizeSymmetry(boolean haveSymmetry)`
Symmetry has been applied.
`org.jmol.adapter.readers.cif.TopoCifParser.TNode`
`findNode(String nodeID, int op, P3 trans)`
Called from TLink and TAtom to find a node with the given symmetry.
`Atom`
`getAtomFromName(String atomLabel)`
`org.jmol.adapter.readers.cif.TopoCifParser.TNet`
`getNetByID(String id)`
Find or create a net with this netID, giving it a default name "Net"+id
`org.jmol.adapter.readers.cif.TopoCifParser.TNet`
`getNetFor(String id, String label, boolean forceNew)`
Find or create a TNet for this id and label.
`boolean`
`processBlock(String key)`
`void`
`ProcessRecord(String key, String data)`
process _topol_node.id 1
`TopoCifParser`
`setReader(CifReader reader)`
filter "TOPOS_TYPES=hb" will only load hydrogen bonds; options include v, vw, and hb

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LINK_TYPE_GENERIC_LINK

public static final int LINK_TYPE_GENERIC_LINK
types set by filter TOPOSE_TYPES in the format of one or more of {v, vw, hb} separated by "+"; default is v+hb

See Also:
  - Constant Field Values

### LINK_TYPE_SINGLE

public static final int LINK_TYPE_SINGLE

See Also:
  - Constant Field Values

### LINK_TYPE_DOUBLE

public static final int LINK_TYPE_DOUBLE

See Also:
  - Constant Field Values

### LINK_TYPE_TRIPLE

public static final int LINK_TYPE_TRIPLE

See Also:
  - Constant Field Values

### LINK_TYPE_QUADRUPLE

public static final int LINK_TYPE_QUADRUPLE

See Also:
  - Constant Field Values

### LINK_TYPE_QUINTUPLE

public static final int LINK_TYPE_QUINTUPLE

See Also:
  - Constant Field Values

### LINK_TYPE_SEXTUPLE

public static final int LINK_TYPE_SEXTUPLE

See Also:
  - Constant Field Values

### LINK_TYPE_SEPTUPLE

public static final int LINK_TYPE_SEPTUPLE

See Also:
  - Constant Field Values

### LINK_TYPE_OCTUPLE

public static final int LINK_TYPE_OCTUPLE

See Also:
  - Constant Field Values

### LINK_TYPE_AROM

public static final int LINK_TYPE_AROM

See Also:
  - Constant Field Values

### LINK_TYPE_POLY

public static final int LINK_TYPE_POLY

See Also:
  - Constant Field Values

### LINK_TYPE_DELO

public static final int LINK_TYPE_DELO

See Also:
  - Constant Field Values

### LINK_TYPE_PI

public static final int LINK_TYPE_PI

See Also:
  - Constant Field Values

### LINK_TYPE_HBOND

public static final int LINK_TYPE_HBOND

See Also:
  - Constant Field Values

### LINK_TYPE_VDW

public static final int LINK_TYPE_VDW

See Also:
  - Constant Field Values

### LINK_TYPE_OTHER

public static final int LINK_TYPE_OTHER

See Also:
  - Constant Field Values

### linkTypes

public static String linkTypes

### LINK_TYPE_BITS

public static final int LINK_TYPE_BITS

See Also:
  - Constant Field Values

## Constructor Details

### TopoCifParser

public TopoCifParser()

## Method Details

### setReader

public TopoCifParser setReader(CifReader reader)
filter "TOPOS_TYPES=hb" will only load hydrogen bonds; options include v, vw, and hb

### ProcessRecord

public void ProcessRecord(String key, String data) throws Exception
process _topol_node.id 1

Throws:
  `Exception`

### processBlock

public boolean processBlock(String key) throws Exception

Throws:
  `Exception`

### finalizeReader

public boolean finalizeReader() throws Exception
PRIOR to symmetry application, process all internal symop/translation aspects.

Throws:
  `Exception`

### finalizeSymmetry

public void finalizeSymmetry(boolean haveSymmetry) throws Exception
Symmetry has been applied. Identify all of the connected atoms and process the group associations

Throws:
  `Exception`

### getNetByID

public org.jmol.adapter.readers.cif.TopoCifParser.TNet getNetByID(String id)
Find or create a net with this netID, giving it a default name "Net"+id

Parameters:
  `id` -
Returns:
  net, never null

### getAtomFromName

public Atom getAtomFromName(String atomLabel)

### getNetFor

public org.jmol.adapter.readers.cif.TopoCifParser.TNet getNetFor(String id, String label, boolean forceNew)
Find or create a TNet for this id and label.

Parameters:
  `id` - or null
  `label` - or null
  `forceNew` - true to create a new net
Returns:
  a net, or null if not forceNew and not found

### findNode

public org.jmol.adapter.readers.cif.TopoCifParser.TNode findNode(String nodeID, int op, P3 trans)
Called from TLink and TAtom to find a node with the given symmetry.

Parameters:
  `nodeID` -
  `op` - match for linkSymop
  `trans` - match for linkTrans
Returns:
  the node, or null if no such node was found