peteboyd / lammps_interface

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

extend UFF4MOF parameters #8

Closed zmzeng closed 6 years ago

zmzeng commented 6 years ago

Thank you for your attention!

I am about to perform an MD using Lammps with UFF4MOF. Now the structure is consist of an UiO-like MOF and a Ni0(H2O)2 molecule. UiO-like MOF can be perfectly supported by UFF4MOF, but nor can Ni0.

So I fit the parameters for Ni0 using gulp according to the literature (only the r1 and theta0 were modified). And I put those parameters in lammps_interface\uff4mof.py.

Could you tell me if it is correct to do that?

[zeng@localhost lammps_interface]$ python lammps_interface.py  ZrBTB-MOL-NiOPT-supercell.cif -ff UFF4MOF
Molecules found in the framework, separating.
WARNING: Molecule 1 with atoms (Ni, O, H, H, O, H, H) will be using the UFF4MOF force field as no  value was set for molecules. To prevent this warning set --molecule-ff=[some force field] on the command line.
WARNING: Could not find an appropriate UFF4MOF type for Ni. Assigning Ni4+2
WARNING: Could not find an appropriate UFF4MOF type for Ni. Assigning Ni1
Files created! -> /home/zeng/lammps_interface

uff4mof.zip

peteboyd commented 6 years ago

Hi zmzeng, If you want to assign your own parameters to the uff4mof file, do so at your own risk. I will not support any changes to the original parameters set by the Heine group. Having said that, it appears that the code is recognizing two different Ni types, a Ni1 and Ni4+2. Just be sure that you will be assigning the parameters you developed to the correct nickel atoms in your system. And yes, to successfully assign your Ni parameters, you must edit the uff4mof.py file in the lammps_interface directory.

Also, please note: your inquiry is not an issue with the code itself. You are asking a question about modifying your local version, so when you raise the issue can you please assign a 'label' to it (i.e. question, or help wanted). Alternatively you can just e-mail one of the developers (probably me).

zmzeng commented 6 years ago

Hi Peter,

What confused me is:

  1. I've assign Ni1 as the ForcefieldType for Ni atom in MS2017, but lammps_interface seems not to recognize it.
  2. there is only one Ni atom in the whole structure, but according to the output by lammps_interface, there were two different type Ni found. I am checking the output .data file manually to see if Coeffs are correct.

And another question is: I want to do the MD in a water box. But after fulfilling the box with H2O molecule, It will cost more than 30GB memory when try to convert cif using lammps_interface, is there some method to low the memory usage?

Thanks a lot! 1

peteboyd commented 6 years ago

Hi

On Feb 26, 2018, at 1:31 PM, zmzeng12 notifications@github.com wrote:

Hi Peter,

What confused me is:

I've assign Ni1 as the ForcefieldType for Ni atom in MS2017, but lammps_interface seems not to recognize it. That is strange. You can check the exact atom types and bonds assigned by lammps_interface if you add the ‘-o’ (lower case o) to the command line. This will output a cif file with the bonds and types included by lammps_interface. You can view this in Materials Studio to see how the material looks, that might give you some answers. there is only one Ni atom in the whole structure, but according to the output by lammps_interface, there were two different type Ni found. I am checking the output .data file manually to see if Coeffs are correct. And another question is: I want to do the MD in a water box. But after fulfilling the box with H2O molecule, It will cost more than 30GB memory when try to convert cif using lammps_interface, is there some method to low the memory usage?

This is an issue of the number of atoms in the material, you could try to make a smaller box of water, then replicate it as a supercell with the “--replication = a b c “ command. set a, b, and c to non-negative integer values. This will reduce the memory usage and still create a large box of water (although a bit more symmetric). Thanks a lot! https://user-images.githubusercontent.com/24548968/36670673-f70f0624-1b33-11e8-865a-355544afe0c1.png — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/peteboyd/lammps_interface/issues/8#issuecomment-368485368, or mute the thread https://github.com/notifications/unsubscribe-auth/AOh0hv1vKOv3yRlvZKLDjQcjV16O5qErks5tYqQegaJpZM4STGUA.

zmzeng commented 6 years ago

Below is the output with '-o' flag. Seems something wrong related to bond order?

[zeng@localhost lammps_interface]$ python lammps_interface.py -o -ff UFF4MOF ZrBTB-MOL-NiOPT-supercell.cif 
Molecules found in the framework, separating.
WARNING: Molecule 1 with atoms (Ni, O, H, H, O, H, H) will be using the UFF4MOF force field as no  value was set for molecules. To prevent this warning set --molecule-ff=[some force field] on the command line.
WARNING: Could not find an appropriate UFF4MOF type for Ni. Assigning Ni4+2
WARNING: Could not find an appropriate UFF4MOF type for Ni. Assigning Ni1
CIF file requested. Exiting...
Traceback (most recent call last):
  File "lammps_interface.py", line 19, in <module>
    write_CIF(graph, cell)
  File "/home/zeng/lammps_interface/lammps_interface/structure_data.py", line 1627, in write_CIF
    type = CCDC_BOND_ORDERS[data['order']]
KeyError: 0.5
peteboyd commented 6 years ago

Hi, because UFF4MOF assigns bond orders of 0.5 in some cases, this is unrecognized as a bond type by the CCDC. I have made a quick fix that should solve this problem, by defaulting to a ‘single’ bond for any unrecognizable bond type in the CIF file. please pull the latest changes to solve that issue. Pete

On Feb 26, 2018, at 1:49 PM, zmzeng12 notifications@github.com wrote:

Below is the output with '-o' flag. Seems something wrong related to bond order?

[zeng@localhost lammps_interface]$ python lammps_interface.py -o -ff UFF4MOF ZrBTB-MOL-NiOPT-supercell.cif Molecules found in the framework, separating. WARNING: Molecule 1 with atoms (Ni, O, H, H, O, H, H) will be using the UFF4MOF force field as no value was set for molecules. To prevent this warning set --molecule-ff=[some force field] on the command line. WARNING: Could not find an appropriate UFF4MOF type for Ni. Assigning Ni4+2 WARNING: Could not find an appropriate UFF4MOF type for Ni. Assigning Ni1 CIF file requested. Exiting... Traceback (most recent call last): File "lammps_interface.py", line 19, in write_CIF(graph, cell) File "/home/zeng/lammps_interface/lammps_interface/structure_data.py", line 1627, in write_CIF type = CCDC_BOND_ORDERS[data['order']] KeyError: 0.5 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/peteboyd/lammps_interface/issues/8#issuecomment-368489520, or mute the thread https://github.com/notifications/unsubscribe-auth/AOh0hqW2kegGfm5bGjWN35voqW_K8x-oks5tYqhGgaJpZM4STGUA.

zmzeng commented 6 years ago

Hi, '-o' flag word fine now. In the ZrBTB-MOL-NiOPT-supercell-l.debug.cif, I see Ni atom was assigned by Ni1 correctly. But the O atom connected to Ni is supposed to be O_3 instead of O_2 because it is O of an H2O.

Thus, I change the forcefield type of those O atoms connected to Ni atom in ZrBTB-MOL-NiOPT-supercell.debug.cif and use it as input cif for lammps_interface. Now everything seems okay. I will put it on a geometry optimized to check if it works well. Thanks a lot!

[zeng@localhost lammps_interface]$ python lammps_interface.py -o -ff UFF4MOF ZrBTB-MOL-NiOPT-supercell-l.cif 
Molecules found in the framework, separating.
WARNING: Molecule 1 with atoms (Ni, O, H, H, O, H, H) will be using the UFF4MOF force field as no  value was set for molecules. To prevent this warning set --molecule-ff=[some force field] on the command line.
CIF file requested. Exiting...
Output cif file written to ZrBTB-MOL-NiOPT-supercell-l.debug.cif

[zeng@localhost lammps_interface]$ python lammps_interface.py -ff UFF4MOF ZrBTB-MOL-NiOPT-supercell-l.cif 
Molecules found in the framework, separating.
WARNING: Molecule 1 with atoms (Ni, O, H, H, O, H, H) will be using the UFF4MOF force field as no  value was set for molecules. To prevent this warning set --molecule-ff=[some force field] on the command line.
Files created! -> /home/zeng/lammps_interface
zmzeng commented 6 years ago

Hi, Pete, Could you please give me some tip about how to assign partially charge to my structure using qeq charge equilibrium method when I use lammps_interface convert cif to lammps data? Thanks!