Assign formal charges to atoms in lammps data file.

The following explanation is under the assumption that the force field you are using employs a constant charge model.

Charges have to be reassigned to the neighbours of the bonded pair. For this puropose, a model molecule has to be prepared that resembles a part of the crosslinked structure. Obtain the charges of the atoms for this model system. Then tweek the charges of the model system such that for a 100 % crosslinked system the net charge is zero. Then use these charge values. Even after tweeking lammps will issue a warning due to floating points. So you have to scale the charge of the entire system.

The following paper by Dr. vikas explains this

A molecular dynamics study of epoxy-based networks: cross-linking procedure and prediction of molecular and material properties


I don’t think there is any LAMMPS command for rescaling the charges in lammps. Is there any tool which can rescale the charges?


You can do it by awk script.