Here we have presented a novel method for molecular dynamics simulation called Flexible Topology that allows for both atomic connectivity and atomic identity to change over the course of a molecular simulation. In Flexible Topology, the identity of atoms are defined by a set of four continuous dynamical variables: partial charge (q), particle size (σ ), and Lennard-Jones well depth (ε) as well as presence variable (λ ) for each atom. These are guided to assemble into a target ligand using a deterministic loss function defined by the difference of atomic environment vectors (AEVs) of the atoms with the AEVs of the target atoms. The AEVs are modified versions of Behler-Parrinello symmetry functions, which describe the local environment around each atom in a way that is invariant to translation and rotation operations. Derivatives of the loss function are used to define atomic forces that are added to an OpenMM MD simulation, implemented using a PyTorch model that incorporates features from the TorchANI 82 package. This was achieved with an external force plugin for the OpenMM tool, referred to as "MLForce", which has already been made freely available on Github. MLForce is responsible for loading the TorchScript file of a TorchANI model and computing the internal force on the ghost This approach is agnostic to the content of the TorchScript file; it can be easily swapped out with a model that computes different AEVs, or with a model that implements a different loss function that involves a deep neural network.