$darkmode
DENOPTIM
denoptim.json.IAtomContainerSerializer Class Reference

Class to serialise CDK's IAtomContainer in a simplified manner. More...

Inheritance diagram for denoptim.json.IAtomContainerSerializer:
[legend]
Collaboration diagram for denoptim.json.IAtomContainerSerializer:
[legend]

Public Member Functions

JsonElement serialize (IAtomContainer iac, Type typeOfSrc, JsonSerializationContext context)
 

Static Protected Attributes

static final String ATOMSKEY = "atoms"
 String used to identify the list of atoms in json map. More...
 
static final String BONDSKEY = "bonds"
 String used to identify the list of bonds in json map. More...
 

Detailed Description

Class to serialise CDK's IAtomContainer in a simplified manner.

The simplification implies that only the coarse definition of atoms and bonds is serialised. Therefore, you must not expect to find all attributes or properties of the full IAtomContainer. The goal of this class is to make the most light-weight JSON representation of an IAtomContainer.

Author
Marco Foscato

Definition at line 47 of file IAtomContainerSerializer.java.

Member Function Documentation

◆ serialize()

JsonElement denoptim.json.IAtomContainerSerializer.serialize ( IAtomContainer  iac,
Type  typeOfSrc,
JsonSerializationContext  context 
)

Definition at line 60 of file IAtomContainerSerializer.java.

References denoptim.json.IAtomContainerSerializer.ATOMSKEY, denoptim.json.IAtomContainerSerializer.BONDSKEY, denoptim.utils.MoleculeUtils.getPoint3d(), and denoptim.utils.MoleculeUtils.getSymbolOrLabel().

Here is the call graph for this function:

Member Data Documentation

◆ ATOMSKEY

final String denoptim.json.IAtomContainerSerializer.ATOMSKEY = "atoms"
staticprotected

String used to identify the list of atoms in json map.

Definition at line 52 of file IAtomContainerSerializer.java.

Referenced by denoptim.json.IAtomContainerDeserializer.deserialize(), and denoptim.json.IAtomContainerSerializer.serialize().

◆ BONDSKEY

final String denoptim.json.IAtomContainerSerializer.BONDSKEY = "bonds"
staticprotected

String used to identify the list of bonds in json map.

Definition at line 57 of file IAtomContainerSerializer.java.

Referenced by denoptim.json.IAtomContainerDeserializer.deserialize(), and denoptim.json.IAtomContainerSerializer.serialize().


The documentation for this class was generated from the following file: