Graph convolutions in Keras with TensorFlow, PyTorch or Jax.
kgcnn.utils
.kgcnn.utils.model
to kgcnn.model.utils
.kgcnn.data.base.MemoryGraphDataset.get_train_test_indices
to return list of train-test index tuples.kgcnn.hyper.hyper.HyperParameter
to deserialize metrics and loss for multi-output models.trajectory_name
in summary.py
and history.py
.kgcnn.layers.geom.PositionEncodingBasisLayer
kgcnn.layers.conv.attention
and kgcnn.layers.conv.message
setup.py
for requirements.kgcnn.scaler.mol.ExtensiveMolecuarScaler
, where scale was not properly applied. However, this was only present in development (master) version, not in release.kgcnn.layers.relational
with relation dense layer.kgcnn.literature.HDNNP2nd
.append
, update
and add
to MemoryGraphList
.GraphDict
, which now is not making a copy of arrays.visual_graph_datasets
.train_force.py
QMDatasets
.kgcnn.md
and kgcnn.xai
.kgcnn.graph.adapter
and switched to completed kgcnn.graph.preprocessor
. The interface to MemoryGraphList
and datasets does not change. How to update:from kgcnn.data.base import GraphDict
GraphDict().apply_preprocessor("sort_edge_indices") # Instead of GraphDict().sort_edge_indices()
GraphDict().apply_preprocessor("set_edge_weights_uniform", value=0.0) # Instead of GraphDict().set_edge_weights_uniform(value=0.0)
# Or directly using class.
from kgcnn.graph.preprocessor import SortEdgeIndices
SortEdgeIndices(in_place=True)(GraphDict())
kgcnn.literature.MEGAN
model.kgcnn.literature.MXMNet
model.ClinToxDataset
label index.kgcnn.graph.adj.get_angle_index
with additional function arguments. Default behaviour remains identical. For periodic system an additional allow_reverse_edges=True
is now required.kgcnn.literature.EGNN
. Debugged model.kgcnn.literature.PAiNN
to simplify normalization option and add equivariant initialization method.kgcnn.data.qm
including all qm7-qm9 datasets. Improved documentation. If error occurs, please run QM9Dataset(reload=True)
.kgcnn.data.moleculenet
. Interface and behaviour does not change.kgcnn.mol.graph_babel
and kgcnn.mol.graph_rdkit
and move conversion into kgcnn.mol.convert
.kgcnn.data.datasets.MD17Dataset
and kgcnn.data.datasets.MD17RevisedDataset
kgcnn.scaler
module to follow sklearn definitions. Changed input naming and order for scaler. Add config and weights functionality.kgcnn.training.scheduler.LinearWarmupExponentialLearningRateScheduler
to take correctly lifetime parameter.kgcnn.data.datasets.QM9Dataset
to offer atomization energies and uncharacterized molecules. Please run reload=True.kgcnn.training
.MemoryGraphList
, please use set/get methods.kgcnn.selection
module.kgcnn.training.history
.kgcnn.data.datasets.PROTEINSDataset
to binary graph labels.kgcnn.literature.CMPNN
model.kgcnn.literature.EGNN
model.set_attributes
into read_in_memory
for MoleculeNetDataset
and make set_attributes
alias of read_in_memory
.kgcnn.literature.GAT
. Rerunning training.kgcnn.training.scheduler.LinearLearningRateScheduler
min. learning rate if trained beyond epoch argument.kgcnn.layers.casting.ChangeIndexing
at it was not used.kgcnn.layers.casting.CastEdgeIndicesToDenseAdjacency
.kgcnn.layers.mlp.MLP
and kgcnn.layers.mlp.GraphMLP
, but kept GraphMLP
as alias. Change in kwargs for "normalization_technique".kgcnn.layers.conv.message
to kgcnn.layers.message
.kgcnn.layers.conv.attention
into kgcnn.layers.conv.gat_conv
and kgcnn.layers.conv.attentivefp_conv
.MoleculeNetDataset
and QMDataset
changed the shape of 'edge_number' to be (N, )
instead of (N, 1)
. To agree with 'node_number' shape.kgcnn.layers.conv.sparse
as it was not used and added its content to kgcnn.layers.conv.gcn_conv
and kgcnn.layers.casting
kgcnn.graph.preprocessor
.kgcnn.crystal
module, which is still in development.get_weights
and get_config
to kgcnn.scaler
get
and set
alias to GraphDict
and MemoryGraphList
. Which now can be used to assign and obtain graph properties.GraphDict
and adj
into kgcnn.graph
.set_range_periodic
function to GraphDict
.make_crystal_model
functions to SchNet, Megnet, DimeNetPP.custom_transform
to MoleculeNetDataset
.add_hydrogen
, make_conformer
, and optimize_conformer
from constructor of MolGraphInterface
.add_hs
, make_conformer
and optimize_conformer
to MolGraphInterface
.make_crystal_model
.kgcnn.literature.CGCNN
model with docs.MemoryGraphList
.kgcnn.mol.encoder
GraphDict.from_networkx()
for edge attributes.make_function
option to training scripts.kgcnn.data.adapter.GraphMethodsAdapter
.kgcnn.layers.modules.ReduceSum
as it has not been used and may be problematic.kgcnn.utils.data
to kgcnn.data.utils
.kgcnn.mol.convert
and renamed kgcnn.mol.gen
to kgcnn.mol.external
GatherEmbedding
to have correct concat axis if index tensor happens to be of rank>3 but ragged_rank=1.kgcnn.mol
methods into modules and renamed graphRD
and graphBabel
.kgcnn.data.crystal.CrystalDataset
.MatBenchDataset2020
dataset to kgcnn.data.datasets
.MemoryGraphList.clean()
to return list of removed indices.ks = tf.keras
MoleculeNetDataset
for invalid smiles which stopped at graph size in #44GraphNumpyContainer
in GraphDict
but kept as alias.to_networkx
and from_networkx
to GraphDict
GraphDict
, i.e. removed the "name_" prefix. This does change previous usage if no default arguments are used!GraphDict
.set_edge_indices_reverse
for GraphDict
.MoleculeNetDataset
to support custom_callbacks
parameter for attributes. The interface did not change else. Accepted #45MemoryGraphList
.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:
Dense
. We therefore renamed keras.py
into modules.py
and layers into e.g. LazyAdd
, LazyConcatenate
and DenseEmbedding
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 for MoleculeNetDataset
.logging
package instead of standard print.hyper.datasets
.kgcnn.data.moleculenet
.DMPNN
to literature.kgcnn.layers.conv
and kgcnn.layers.pool
.