this should just take the topology itself as input, as opposed to the trajectory.