Motifs in temporal networks

Temporal motifs code in SNAP

The code to count temporal network motifs is in the latest version of of SNAP. See the examples/temporalmotifs directory for sample code. Here is an example of how to use the code:

# Download SNAP
git clone
# Build the code
cd snap/
# Run the temporal motifs example
cd examples/temporalmotifs/
./temporalmotifsmain -i:example-temporal-graph.txt -delta:300 -o:counts.txt
# See the output
cat counts.txt

The counts in the file counts.txt follow the counts matrix in the paper: