kgcnn 2.0.0
Realse version 2.0
New version 2 of kgcnn including refactored layers, datasets and training scripts. Changes are not fully compatible with version <2.0.0 of kgcnn. Future updates of version 2.0 are not supposed to introduce breaking changes to the API but add additional functionality and bug fixes. More extensive documentation and tutorials are planned. Some notable changes of version 2.0:
Changes and new features
- More general training scripts for each overall dataset type, like QM, TUDataset. Changes in the hyperparameter config to incorporate future extensions of eg. cross-validation or scaling and encoding of targets with keras-like serialization.
- Renamed dataset classes to dynamically load also dataset module in training script.
- Dataset base class is now a list of individual graphs instead of a collection of lists.
- A graph is represented by a python dictionary of named arrays for indices, node attributes etc.
- Every literature model has now a MLP at the output which defines the model output activation and units.
- Added normalization layers for Graphs following keras naming convention.
- The MLP class now also has dropout and normalization options and therefore had to be split into GraphMLP and MLP, since normalization on graphs is not identical to feed forward networks. Without normalization they are interchangeable.
- Renaming of base layers since in tf.version > 2.7 it is not possible to have a module named keras.py and identical layer names. Most standard keras layers now fully support ragged tensors as for example
Dense
. We therefore renamedkeras.py
intomodules.py
and layers into e.g.LazyAdd
,LazyConcatenate
andDenseEmbedding
for using keras-corresponding layers compatible with tf.version < 2.7. MoleculeNetDataset
now uses both RDkit and OpenBabel to generate molecular structures from smiles more reliable and optionally generate conformers. Conformer generation is parallelized for multiple molecules to greatly speed up SDF file generation. Note that node/edge or atom/bond attributes still require RDkit and molecules that fail RDkit valence test can not be used if specific attributes are desired. We also started to add the option for external conformer generation programs such as balloon in place of RDkit/OpenBabel. OpenBabel is now also a necessary dependency forMoleculeNetDataset
.- Started to add periodic crystal graph plug-in for the standard GNNs in kgcnn but that is not working yet. Will be possible in future releases.
- Warning and info notifications in modules now uses
logging
package instead of standard print.