# Class QCJSONWriter

java.lang.Object
org.jmol.util.JSONWriter
org.jmol.adapter.writers.QCJSONWriter

All Implemented Interfaces:
  `JmolWriter`

public class QCJSONWriter extends JSONWriter implements JmolWriter
A very experimental class for writing QCJSON files. This standard is in the process of being developed, so any of this could change at any time. All we have here is Bob Hanson's experiment with getting Jmol to save and restore structures, vibrations, and molecular orbitals. Data set Bob is using is at https://sourceforge.net/p/jmol/code/HEAD/tree/trunk/Jmol-datafiles/qcjson

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`QCJSONWriter.SparseArray`
/ sparse array handling ////

## Field Summary

### Fields inherited from class JSONWriter

`indent, oc`

## Constructor Summary

Constructors
Constructor
Description
`QCJSONWriter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`closeSchema()`
`protected Object`
`getAndCheckValue(Map<String,Object> map, String key)`
`Object`
`getProperty(int modelIndex, String key)`
`void`
`openSchema()`
`void`
`set(Viewer viewer, OC oc, Object[] data)`
`String`
`toString()`
`String`
`write(BS bs)`
`void`
`writeAtoms(int modelIndex)`
`void`
`writeBonds(int modelIndex)`
`void`
`writeJob(int iJob)`
`void`
`writeJobMetadata()`
`void`
`writeJobs()`
`void`
`writeJSON()`
`void`
`writeMagic()`
`void`
`writeMOBases()`
`int`
`writeModel(int modelIndex)`
`void`
`writeModelMetadata(int modelIndex)`
`void`
`writeModels()`
`void`
`writeObject(Object o)`
`void`
`writeSchemaMetadata()`
`void`
`writeTopology(int modelIndex)`
`int`
`writeVibrations(int modelIndex)`

### Methods inherited from class JSONWriter

`append, arrayAdd, arrayClose, arrayOpen, closeStream, mapAddKey, mapAddKeyValue, mapAddKeyValueRaw, mapAddMapAllExcept, mapClose, mapOpen, setModifyKeys, setStream, setWhiteSpace, setWriteNullAsString, writeArray, writeBoolean, writeList, writeMap, writeNull, writeNumber, writeString, writeString`

### Methods inherited from class Object

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

## Constructor Details

### QCJSONWriter

public QCJSONWriter()

## 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`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### writeJSON

public void writeJSON()

### writeSchemaMetadata

public void writeSchemaMetadata()

### openSchema

public void openSchema()

### writeMagic

public void writeMagic()

### closeSchema

public void closeSchema()

### writeJobs

public void writeJobs()

### writeJob

public void writeJob(int iJob)

### writeJobMetadata

public void writeJobMetadata()

### writeModels

public void writeModels()

### writeModel

public int writeModel(int modelIndex)

### writeTopology

public void writeTopology(int modelIndex)

### getProperty

public Object getProperty(int modelIndex, String key)

### writeModelMetadata

public void writeModelMetadata(int modelIndex)

### writeAtoms

public void writeAtoms(int modelIndex)

### writeBonds

public void writeBonds(int modelIndex)

### writeVibrations

public int writeVibrations(int modelIndex)

### getAndCheckValue

protected Object getAndCheckValue(Map<String,Object> map, String key)

Overrides:
  `getAndCheckValue` in class `JSONWriter`

### writeMOBases

public void writeMOBases()

### writeObject

public void writeObject(Object o)

Overrides:
  `writeObject` in class `JSONWriter`