# Class CIFWriter

java.lang.Object
org.jmol.adapter.writers.XtlWriter
org.jmol.adapter.writers.CIFWriter

All Implemented Interfaces:
  `JmolWriter`

Direct Known Subclasses:
  `FSG2SCIFConverter`

public class CIFWriter extends XtlWriter implements JmolWriter
A basic CIF writer only.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String[]`
`atomLabels`
`protected Atom[]`
`atoms`
`protected BS`
`bsOut`
`protected Object[]`
`data`
`protected boolean`
`haveCustom`
`protected boolean`
`isCIF2`
`protected boolean`
`isP1`
`protected SB`
`jmol_atoms`
`protected short`
`modelIndex`
`protected Map<String,Object>`
`modelInfo`
`protected int`
`nops`
`protected OC`
`oc`
`protected SymmetryInterface`
`uc`
`protected Viewer`
`vwr`

### Fields inherited from class XtlWriter

`haveUnitCell, isHighPrecision, precision, slop`

## Constructor Summary

Constructors
Constructor
Description
`CIFWriter()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`append3(SB sb, T3 a)`
`protected static void`
`appendField(SB sb, String val, int width)`
`protected SB`
`appendKey(SB sb, String key, int width)`
`protected void`
`prepareAtomSet(BS bs)`
`void`
`set(Viewer viewer, OC oc, Object[] data)`
`String`
`toString()`
`String`
`write(BS bs)`
`protected int`
`writeAtomSite(SB sb)`
`protected boolean`
`writeChecked(SB output, String val)`
see https://github.com/rcsb/ciftools-java/blob/master/src/main/java/org/rcsb/cif/text/TextCifWriter.java
`protected void`
`writeHeader(SB sb)`
`protected void`
`writeMultiline(SB output, String val)`
`protected void`
`writeOperations(SB sb)`
`protected void`
`writeParams(SB sb)`

### Methods inherited from class XtlWriter

`clean, cleanT`

### Methods inherited from class Object

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

## Field Details

### vwr

protected Viewer vwr

### oc

protected OC oc

### data

protected Object[] data

### isP1

protected boolean isP1

### isCIF2

protected boolean isCIF2

### modelIndex

protected short modelIndex

### haveCustom

protected boolean haveCustom

### uc

protected SymmetryInterface uc

### bsOut

protected BS bsOut

### atoms

protected Atom[] atoms

### nops

protected int nops

### atomLabels

protected String[] atomLabels

### jmol_atoms

protected SB jmol_atoms

### modelInfo

protected Map<String,Object> modelInfo

## Constructor Details

### CIFWriter

public CIFWriter()

## Method Details

### set

public void set(Viewer viewer, OC oc, Object[] data)

Specified by:
  `set` in interface `JmolWriter`

### write

public String write(BS bs)

Specified by:
  `write` in interface `JmolWriter`

### prepareAtomSet

protected void prepareAtomSet(BS bs)

### writeHeader

protected void writeHeader(SB sb)

### writeOperations

protected void writeOperations(SB sb)

### writeParams

protected void writeParams(SB sb)

### writeAtomSite

protected int writeAtomSite(SB sb)

### appendField

protected static void appendField(SB sb, String val, int width)

### append3

protected void append3(SB sb, T3 a)

### writeChecked

protected boolean writeChecked(SB output, String val)
see https://github.com/rcsb/ciftools-java/blob/master/src/main/java/org/rcsb/cif/text/TextCifWriter.java

Parameters:
  `output` -
  `val` -
Returns:
  true if multiline

### writeMultiline

protected void writeMultiline(SB output, String val)

### appendKey

protected SB appendKey(SB sb, String key, int width)

### toString

public String toString()

Overrides:
  `toString` in class `Object`