Package org.jmol.adapter.writers
Class QCJSONWriter
java.lang.Object
org.jmol.util.JSONWriter
org.jmol.adapter.writers.QCJSONWriter
- All Implemented Interfaces:
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int[][]
private boolean
private javajs.util.Lst
<int[]> private Viewer
Fields inherited from class org.jmol.util.JSONWriter
indent, oc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
Add a basis to the associative array moBases keyed on its hashcodevoid
private Object
fixCoefficients
(double[] coeffs) Jmol allows for a set of arrays that map coefficient indicies with nonstandard order to Gaussian/Molden order.When an MO is calculated in Jmol, Jmol will check the integration so that it can be checked to be close to 1.0000.private String
formatNumber
(float x) protected Object
getAndCheckValue
(Map<String, Object> map, String key) private Object
getAuxiliaryData
(int modelIndex, String key) getProperty
(int modelIndex, String key) private boolean
haveMOData
(int modelIndex) private boolean
isVibration
(int modelIndex) void
void
private void
setDFCoord
(Map<String, Object> moData) toString()
write
(javajs.util.BS bs) void
writeAtoms
(int modelIndex) void
writeBonds
(int modelIndex) void
writeJob
(int iJob) void
void
void
void
private void
writeMapKeyValueUnits
(String key, Object value, String units) void
private void
writeMOData
(int modelIndex) int
writeModel
(int modelIndex) void
writeModelMetadata
(int modelIndex) void
void
private void
writePrefix_Units
(String prefix, String units) void
void
writeTopology
(int modelIndex) int
writeVibrations
(int modelIndex) Methods inherited from class org.jmol.util.JSONWriter
append, arrayAdd, arrayClose, arrayOpen, closeStream, mapAddKey, mapAddKeyValue, mapAddKeyValueRaw, mapAddMapAllExcept, mapClose, mapOpen, setModifyKeys, setStream, setWhiteSpace, setWriteNullAsString, writeArray, writeBoolean, writeList, writeMap, writeNull, writeNumber, writeString, writeString
-
Field Details
-
moBases
-
htBasisMap
-
filterMOs
private boolean filterMOs -
vwr
-
basisID
private int basisID -
shells
private javajs.util.Lst<int[]> shells -
dfCoefMaps
private int[][] dfCoefMaps -
integrationKeyMap
-
-
Constructor Details
-
QCJSONWriter
public QCJSONWriter()
-
-
Method Details
-
set
- Specified by:
set
in interfaceJmolWriter
-
write
- Specified by:
write
in interfaceJmolWriter
-
toString
-
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
-
isVibration
private boolean isVibration(int modelIndex) -
writeModelMetadata
public void writeModelMetadata(int modelIndex) -
writeAtoms
public void writeAtoms(int modelIndex) -
formatNumber
-
writePrefix_Units
-
writeBonds
public void writeBonds(int modelIndex) -
writeVibrations
public int writeVibrations(int modelIndex) -
writeMapKeyValueUnits
-
haveMOData
private boolean haveMOData(int modelIndex) -
getAuxiliaryData
-
writeMOData
private void writeMOData(int modelIndex) -
fixIntegration
When an MO is calculated in Jmol, Jmol will check the integration so that it can be checked to be close to 1.0000. This integration value is saved back in the MO data, but it is not a standard key. (As though anything is here!) So we set a key mapping to replace it.- Returns:
- the "integration" key map
-
getAndCheckValue
- Overrides:
getAndCheckValue
in classJSONWriter
-
fixCoefficients
Jmol allows for a set of arrays that map coefficient indicies with nonstandard order to Gaussian/Molden order. Here we do the conversion upon writing so that the order is always Gaussian/Molden order.- Parameters:
coeffs
-- Returns:
-
setDFCoord
-
addBasis
Add a basis to the associative array moBases keyed on its hashcode- Parameters:
moData
-- Returns:
- ID for this basis.
-
writeMOBases
public void writeMOBases() -
writeObject
- Overrides:
writeObject
in classJSONWriter
-