Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import matplotlib.pyplot as plt
from collections import defaultdict
class LAMMPSTrajectoryAnalyzer:
def __init__(self, trajectory_file):
self.trajectory_file = trajectory_file
self.timesteps = []
self.num_atoms = 0
self.box_bounds = None
import numpy as np
import matplotlib.pyplot as plt
from collections import defaultdict
import networkx as nx
import os
import sys
from tqdm import tqdm
def parse_lammps_trajectory(lammpstrj_file):
"""Parse LAMMPS trajectory file and extract atom positions and timesteps."""
# ----------------------------------------------
# Lignin to Glassy Carbon Conversion using ReaxFF
# ----------------------------------------------
# --------------------------
# Initialization
# --------------------------
units real
dimension 3
boundary p p p
atom_style full