peteboyd / lammps_interface

automatic generation of LAMMPS input files for molecular dynamics simulations of MOFs
MIT License
125 stars 63 forks source link

How to obtain the charge of each atom of MOFs? #12

Closed pincher-chen closed 5 years ago

pincher-chen commented 5 years ago

Hi,

I want to use UFF4MOF to simulate my model, but I found the charges of MOFs are not assigned by lammps_interface.py. A method is mentioned in paper of Journal of Computational Chemistry, Vol. 11, No. 4, 431-439 (1990) . Here, if i get charges by method of quantum chemistry, I am wondering how lammps_interface.py writes charges to data file of lammps. Can you give me some tips?

askforarun commented 5 years ago

quick and dirty solution: Cut the "Atom section" paste in to matlab as a matrix say A Open matlab Charge= [....] Then A(:,3)=charge;

Elegant solution: grep, bash, awk, sed

peteboyd commented 5 years ago

Hi, If you have partial charges for each atom, you can enter them as a new column in the .cif file as '_atom_type_partial_charge' in the atom block.