Skip to content

Commit

Permalink
Fixed codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav S Deshmukh committed Sep 7, 2023
1 parent 16decbc commit 72e986b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/graphs.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""Classes to create bulk, surface, and adsorbate graphs."""

import abc

import networkx as nx
import numpy as np

from ase.neighborlist import build_neighbor_list


class AtomsGraph:
"""Create graph representation of a collection of atoms."""

def __init__(self, atoms, select_idx, max_atoms=50):
"""Initialize variables of the class.
Expand Down Expand Up @@ -64,7 +65,7 @@ def create_graph(self):
nn,
atomic_number=self.atoms[nn].number,
symbol=self.atoms[nn].symbol,
position=self.atoms[nn].position
position=self.atoms[nn].position,
)
# Calculate bond distance
bond_dist = np.linalg.norm(
Expand All @@ -74,7 +75,7 @@ def create_graph(self):

# Assign graph object
self.graph = graph

def featurize(self, node_featurizer, bond_featurizer):
"""Featurize nodes and edges of the graph.
Expand All @@ -89,7 +90,7 @@ def featurize(self, node_featurizer, bond_featurizer):

def plot(self, filename=None):
"""Plot the graph using NetworkX.
Parameters
----------
filename: str (optional)
Expand All @@ -99,21 +100,20 @@ def plot(self, filename=None):

def get_node_tensor(self):
"""Get the node matrix of the graph as a PyTorch Tensor.
Returns
-------
node_matrix: torch.Tensor
Node matrix
"""
pass

def get_edge_tensor(self):
"""Get the edge matrix of the graph as a PyTorch Tensor.
Returns
-------
edge_matrix: torch.Tensor
Edge tensor
"""
pass

0 comments on commit 72e986b

Please sign in to comment.