Code Monkey home page Code Monkey logo

lammps_interface's Introduction

Build Status Docs status PyPI version

LAMMPS Interface

This package is currently unmaintained. See here if you are interested in helping out.

Authors

  • Peter Boyd
  • Mohamad Moosavi
  • Matthew Witman

Description

This program was designed for easy interface between the crystallographic information file (.cif) and the Large-scale Atomic Molecular Massively Parallel Simulator (Lammps).

Installation

Simply install from PyPI:

pip install lammps-interface

For development purposes, clone the repository and install it from source:

pip install -e .

Note: In both cases, this adds lammps-interface to your PATH.

Usage

Command line interface

To see the optional arguments type:

lammps-interface --help

To create Lammps simulation files for a given cif file type:

lammps-interface cif_file.cif

This will create Lammps simulation files with UFF parameters.

Note: lammps-interface expects CIF files in P1 symmetry.

Jupyter notebook

In order to integrate lammps-interface into your project, check out the Jupyter notebooks provided in /notebooks for usage examples.

License

MIT license (see LICENSE)

Citation

The publication associated with this code is found here:

Boyd, P. G., Moosavi, S. M., Witman, M. & Smit, B. Force-Field Prediction of Materials Properties in Metal-Organic Frameworks. J. Phys. Chem. Lett. 8, 357-363 (2017).

https://dx.doi.org/10.1021/acs.jpclett.6b02532

lammps_interface's People

Contributors

jaharvey8 avatar kbsezginel avatar ltalirz avatar mwitman1 avatar paulboone avatar peteboyd avatar seyedmohamadmoosavi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lammps_interface's Issues

Errors during execution of lammps-interface in windows version .

After a normal installation and after the last fix of the windows version I get this error

C:\Users\kosta\AppData\Local\Programs\Python\Python37\Lib\site-packages\lammps_interface>lammps-interface Cu.cif
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Traceback (most recent call last):
File "c:\users\kosta\appdata\local\programs\python\python37\lib\site-packages\lammps_interface\CIFIO.py", line 59, in read
key, val = line.strip().split()
ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\kosta\AppData\Local\Programs\Python\Python37\Scripts\lammps-interface-script.py", line 11, in
load_entry_point('lammps-interface==0.1.2', 'console_scripts', 'lammps-interface')()
File "c:\users\kosta\appdata\local\programs\python\python37\lib\site-packages\lammps_interface\cli.py", line 12, in main
cell, graph = from_CIF(options.cif_file)
File "c:\users\kosta\appdata\local\programs\python\python37\lib\site-packages\lammps_interface\structure_data.py", line 1544, in from_CIF
cifobj.read(cifname)
File "c:\users\kosta\appdata\local\programs\python\python37\lib\site-packages\lammps_interface\CIFIO.py", line 61, in read
key, val = line.strip().split()[:2]
ValueError: not enough values to unpack (expected 2, got 1)

Error in generating raspa input from polymer cif file

Error in generating raspa input files from polymer cif file
Operating environment:Anaconda 3 , Programs installed with conda install -c conda-forge lammps-interface
Attachment is PANI03.cif document.

The error message is as follows:

$ lammps-interface -or -ff Dreiding --npt PANI03.cif

totatomlen = 1810
compute_topology_information()
func: cartesian_coordinates; Elps. 0.024s
func: min_img_distances; Elps. 30.202s
func: compute_bonding; Elps. 30.452s
func: init_typing; Elps. 30.829s
func: bond_typing; Elps. 30.856s
func: angles; Elps. 30.865s
func: dihedrals; Elps. 30.875s
func: improper_dihedrals; Elps. 30.886s
Files created! -> /home/lammps-test/chitosan-PANI03/PANI03
Writing RASPA files to current WD
Output cif file written to PANI03_raspa.cif
1
{'_atom_site_fract_x': '-0.25360', '_atom_site_fract_y': '1.31535', '_atom_site_fract_z': '0.07455', '_atom_site_U_iso_or_equiv': '0.00000', '_atom_site_adp_type': 'Uiso', '_atom_site_occupancy': '1.00', 'mass': 14.0067, 'molid': 444, 'element': 'N', 'cycle': False, 'rings': [], 'atomic_number': 7, 'pair_potential': lj/cut 12.500, 'h_bond_donor': False, 'h_bond_potential': None, 'tabulated_potential': False, 'table_potential': None, 'charge': 0.0, 'force_field_type': 'N_3', 'index': 1, 'ciflabel': 'N1', 'cartesian_coordinates': array([-10.72809152, 55.64351412, 3.15370356]), 'hybridization': 'sp3', 'angles': {(2, 3): {'potential': <lammps_interface.lammps_potentials.AnglePotential.CosineSquared object at 0x146b26a62f98>, 'ff_type_index': 1}, (2, 23): {'potential': <lammps_interface.lammps_potentials.AnglePotential.CosineSquared object at 0x146b26a4d278>, 'ff_type_index': 1}, (3, 23): {'potential': <lammps_interface.lammps_potentials.AnglePotential.CosineSquared object at 0x146b26a4d2b0>, 'ff_type_index': 1}}, 'impropers': {}, 'ff_type_index': 1, 'node': 1}
Traceback (most recent call last):
File "/home/anaconda3/envs/vaspkit/bin/lammps-interface", line 10, in
sys.exit(main())
File "/home/anaconda3/envs/vaspkit/lib/python3.6/site-packages/lammps_interface/cli.py", line 35, in main
write_RASPA_sim_files(sim, classifier)
File "/home/anaconda3/envs/vaspkit/lib/python3.6/site-packages/lammps_interface/structure_data.py", line 1947, in write_RASPA_sim_files
if(int(data['image']) > max_image):
KeyError: 'image'

PANI03.cif.txt

LAMMPS implementation of angle_style cosine/periodic contains undocumented factor 2

The implementation of angle_style cosine/periodic in LAMMPS contains an undocumented factor of 2, which means that lammps_interface leads to angle bending constants which are too large for UFF and other force fields.

The problematic lines in the source code of LAMMPS are L140 and L298. For example, the latter is

return 2.0*k[type]*(1.0-b[type]*powsign(multiplicity[type])*c);

At least for UFF the factor of 2 is not wanted.

As an update of the LAMMPS documentation is more likely than a change of the implementation, I would suggest to account for the factor 2 in the respective force field methods.

bug in lammps interface

Hi
I,m testing last version of lammps interface with a .cif produced from material studio, (testing with UFF force field) but I obtain error

lammps-interface TON_1x1x3_METHANE_B.cif
fatal: Not a git repository (or any of the parent directories): .git
Molecules found in the framework, separating.
Traceback (most recent call last):
File "/usr/local/bin/lammps-interface", line 6, in
exec(compile(open(file).read(), file, 'exec'))
File "/opt/lammps_interface-master/lammps-interface", line 14, in
sim.assign_force_fields()
File "/opt/lammps_interface-master/lammps_interface/lammps_main.py", line 462, in assign_force_fields
atoms = ", ".join([rep.node[j]['element'] for j in rep.nodes()])
File "/opt/lammps_interface-master/lammps_interface/lammps_main.py", line 462, in
atoms = ", ".join([rep.node[j]['element'] for j in rep.nodes()])
AttributeError: 'MolecularGraph' object has no attribute 'node'

my cif file is similar to example in directory test.
Is it peraphs a bug
Could I fix it?

my cif file

data_TON_1x1x3_METHANE
_audit_creation_date 2019-12-12
_audit_creation_method 'Materials Studio'
_symmetry_space_group_name_H-M 'P1'
_symmetry_Int_Tables_number 1
symmetry_cell_setting triclinic
loop

_symmetry_equiv_pos_as_xyz
x,y,z
_cell_length_a 13.8590
_cell_length_b 17.4200
_cell_length_c 15.1140
_cell_angle_alpha 90.0000
_cell_angle_beta 90.0000
cell_angle_gamma 90.0000
loop

_atom_site_label
_atom_site_type_symbol
atom_site_description
atom_site_fract_x
atom_site_fract_y
atom_site_fract_z
atom_site_charge
Si1 Si Si3 0.29510 0.04820 0.07550 0.00000
Si2 Si Si3 0.20550 0.21120 0.04817 0.00000
O3 O O_3_z 0.09230 0.42680 0.23257 0.00000
O4 O O_3_z 0.09420 0.22240 0.06893 0.00000
O5 O O_3_z 0.27120 0.37890 0.22130 0.00000
O6 O O_3_z 0.22880 0.48000 0.00780 0.00000
O7 O O_3_z 0.27050 0.25840 0.11783 0.00000
Si8 Si Si3 0.79510 0.54820 0.07550 0.00000
Si9 Si Si3 0.70550 0.71120 0.04817 0.00000
O10 O O_3_z 0.59230 0.92680 0.23257 0.00000
O11 O O_3_z 0.59420 0.72240 0.06893 0.00000
O12 O O_3_z 0.77120 0.87890 0.22130 0.00000
O13 O O_3_z 0.72880 0.98000 0.00780 0.00000
O14 O O_3_z 0.77050 0.75840 0.11783 0.00000
Si15 Si Si3 0.70490 0.95180 0.24217 0.00000
Si16 Si Si3 0.79450 0.78880 0.21483 0.00000
O17 O O_3_z 0.90770 0.57320 0.06590 0.00000
O18 O O_3_z 0.90580 0.77760 0.23560 0.00000
O19 O O_3_z 0.72880 0.62110 0.05463 0.00000
O20 O O_3_z 0.77120 0.52000 0.17447 0.00000
O21 O O_3_z 0.72950 0.74160 0.28450 0.00000
Si22 Si Si3 0.20490 0.45180 0.24217 0.00000
Si23 Si Si3 0.29450 0.28880 0.21483 0.00000
O24 O O_3_z 0.40770 0.07320 0.06590 0.00000
O25 O O_3_z 0.40580 0.27760 0.23560 0.00000
O26 O O_3_z 0.22880 0.12110 0.05463 0.00000
O27 O O_3_z 0.27120 0.02000 0.17447 0.00000
O28 O O_3_z 0.22950 0.24160 0.28450 0.00000
Si29 Si Si3 0.29510 0.95180 0.24217 0.00000
Si30 Si Si3 0.20550 0.78880 0.21483 0.00000
O31 O O_3_z 0.09230 0.57320 0.06590 0.00000
O32 O O_3_z 0.09420 0.77760 0.23560 0.00000
O33 O O_3_z 0.27120 0.62110 0.05463 0.00000
O34 O O_3_z 0.22880 0.52000 0.17447 0.00000
O35 O O_3_z 0.27050 0.74160 0.28450 0.00000
Si36 Si Si3 0.79510 0.45180 0.24217 0.00000
Si37 Si Si3 0.70550 0.28880 0.21483 0.00000
O38 O O_3_z 0.59230 0.07320 0.06590 0.00000
O39 O O_3_z 0.59420 0.27760 0.23560 0.00000
O40 O O_3_z 0.77120 0.12110 0.05463 0.00000
O41 O O_3_z 0.72880 0.02000 0.17447 0.00000
O42 O O_3_z 0.77050 0.24160 0.28450 0.00000
Si43 Si Si3 0.70490 0.04820 0.07550 0.00000
Si44 Si Si3 0.79450 0.21120 0.04817 0.00000
O45 O O_3_z 0.90770 0.42680 0.23257 0.00000
O46 O O_3_z 0.90580 0.22240 0.06893 0.00000
O47 O O_3_z 0.72880 0.37890 0.22130 0.00000
O48 O O_3_z 0.77120 0.48000 0.00780 0.00000
O49 O O_3_z 0.72950 0.25840 0.11783 0.00000
Si50 Si Si3 0.20490 0.54820 0.07550 0.00000
Si51 Si Si3 0.29450 0.71120 0.04817 0.00000
O52 O O_3_z 0.40770 0.92680 0.23257 0.00000
O53 O O_3_z 0.40580 0.72240 0.06893 0.00000
O54 O O_3_z 0.22880 0.87890 0.22130 0.00000
O55 O O_3_z 0.27120 0.98000 0.00780 0.00000
O56 O O_3_z 0.22950 0.75840 0.11783 0.00000
Si57 Si Si3 0.00000 0.27370 0.08333 0.00000
Si58 Si Si3 0.00000 0.37680 0.24883 0.00000
O59 O O_3_z 0.00000 0.30620 0.18137 0.00000
O60 O O_3_z 0.00000 0.34500 0.01643 0.00000
Si61 Si Si3 0.50000 0.77370 0.08333 0.00000
Si62 Si Si3 0.50000 0.87680 0.24883 0.00000
O63 O O_3_z 0.50000 0.80620 0.18137 0.00000
O64 O O_3_z 0.50000 0.84500 0.01643 0.00000
Si65 Si Si3 0.00000 0.72630 0.25000 0.00000
Si66 Si Si3 0.00000 0.62320 0.08217 0.00000
O67 O O_3_z 0.00000 0.69380 0.01470 0.00000
O68 O O_3_z 0.00000 0.65500 0.18310 0.00000
Si69 Si Si3 0.50000 0.22630 0.25000 0.00000
Si70 Si Si3 0.50000 0.12320 0.08217 0.00000
O71 O O_3_z 0.50000 0.19380 0.01470 0.00000
O72 O O_3_z 0.50000 0.15500 0.18310 0.00000
Si73 Si Si3 0.29510 0.04820 0.40883 0.00000
Si74 Si Si3 0.20550 0.21120 0.38150 0.00000
O75 O O_3_z 0.09230 0.42680 0.56590 0.00000
O76 O O_3_z 0.09420 0.22240 0.40227 0.00000
O77 O O_3_z 0.27120 0.37890 0.55463 0.00000
O78 O O_3_z 0.22880 0.48000 0.34113 0.00000
O79 O O_3_z 0.27050 0.25840 0.45117 0.00000
Si80 Si Si3 0.79510 0.54820 0.40883 0.00000
Si81 Si Si3 0.70550 0.71120 0.38150 0.00000
O82 O O_3_z 0.59230 0.92680 0.56590 0.00000
O83 O O_3_z 0.59420 0.72240 0.40227 0.00000
O84 O O_3_z 0.77120 0.87890 0.55463 0.00000
O85 O O_3_z 0.72880 0.98000 0.34113 0.00000
O86 O O_3_z 0.77050 0.75840 0.45117 0.00000
Si87 Si Si3 0.70490 0.95180 0.57550 0.00000
Si88 Si Si3 0.79450 0.78880 0.54817 0.00000
O89 O O_3_z 0.90770 0.57320 0.39923 0.00000
O90 O O_3_z 0.90580 0.77760 0.56893 0.00000
O91 O O_3_z 0.72880 0.62110 0.38797 0.00000
O92 O O_3_z 0.77120 0.52000 0.50780 0.00000
O93 O O_3_z 0.72950 0.74160 0.61783 0.00000
Si94 Si Si3 0.20490 0.45180 0.57550 0.00000
Si95 Si Si3 0.29450 0.28880 0.54817 0.00000
O96 O O_3_z 0.40770 0.07320 0.39923 0.00000
O97 O O_3_z 0.40580 0.27760 0.56893 0.00000
O98 O O_3_z 0.22880 0.12110 0.38797 0.00000
O99 O O_3_z 0.27120 0.02000 0.50780 0.00000
O100 O O_3_z 0.22950 0.24160 0.61783 0.00000
Si101 Si Si3 0.29510 0.95180 0.57550 0.00000
Si102 Si Si3 0.20550 0.78880 0.54817 0.00000
O103 O O_3_z 0.09230 0.57320 0.39923 0.00000
O104 O O_3_z 0.09420 0.77760 0.56893 0.00000
O105 O O_3_z 0.27120 0.62110 0.38797 0.00000
O106 O O_3_z 0.22880 0.52000 0.50780 0.00000
O107 O O_3_z 0.27050 0.74160 0.61783 0.00000
Si108 Si Si3 0.79510 0.45180 0.57550 0.00000
Si109 Si Si3 0.70550 0.28880 0.54817 0.00000
O110 O O_3_z 0.59230 0.07320 0.39923 0.00000
O111 O O_3_z 0.59420 0.27760 0.56893 0.00000
O112 O O_3_z 0.77120 0.12110 0.38797 0.00000
O113 O O_3_z 0.72880 0.02000 0.50780 0.00000
O114 O O_3_z 0.77050 0.24160 0.61783 0.00000
Si115 Si Si3 0.70490 0.04820 0.40883 0.00000
Si116 Si Si3 0.79450 0.21120 0.38150 0.00000
O117 O O_3_z 0.90770 0.42680 0.56590 0.00000
O118 O O_3_z 0.90580 0.22240 0.40227 0.00000
O119 O O_3_z 0.72880 0.37890 0.55463 0.00000
O120 O O_3_z 0.77120 0.48000 0.34113 0.00000
O121 O O_3_z 0.72950 0.25840 0.45117 0.00000
Si122 Si Si3 0.20490 0.54820 0.40883 0.00000
Si123 Si Si3 0.29450 0.71120 0.38150 0.00000
O124 O O_3_z 0.40770 0.92680 0.56590 0.00000
O125 O O_3_z 0.40580 0.72240 0.40227 0.00000
O126 O O_3_z 0.22880 0.87890 0.55463 0.00000
O127 O O_3_z 0.27120 0.98000 0.34113 0.00000
O128 O O_3_z 0.22950 0.75840 0.45117 0.00000
Si129 Si Si3 0.00000 0.27370 0.41667 0.00000
Si130 Si Si3 0.00000 0.37680 0.58217 0.00000
O131 O O_3_z 0.00000 0.30620 0.51470 0.00000
O132 O O_3_z 0.00000 0.34500 0.34977 0.00000
Si133 Si Si3 0.50000 0.77370 0.41667 0.00000
Si134 Si Si3 0.50000 0.87680 0.58217 0.00000
O135 O O_3_z 0.50000 0.80620 0.51470 0.00000
O136 O O_3_z 0.50000 0.84500 0.34977 0.00000
Si137 Si Si3 0.00000 0.72630 0.58333 0.00000
Si138 Si Si3 0.00000 0.62320 0.41550 0.00000
O139 O O_3_z 0.00000 0.69380 0.34803 0.00000
O140 O O_3_z 0.00000 0.65500 0.51643 0.00000
Si141 Si Si3 0.50000 0.22630 0.58333 0.00000
Si142 Si Si3 0.50000 0.12320 0.41550 0.00000
O143 O O_3_z 0.50000 0.19380 0.34803 0.00000
O144 O O_3_z 0.50000 0.15500 0.51643 0.00000
Si145 Si Si3 0.29510 0.04820 0.74217 0.00000
Si146 Si Si3 0.20550 0.21120 0.71483 0.00000
O147 O O_3_z 0.09230 0.42680 0.89923 0.00000
O148 O O_3_z 0.09420 0.22240 0.73560 0.00000
O149 O O_3_z 0.27120 0.37890 0.88797 0.00000
O150 O O_3_z 0.22880 0.48000 0.67447 0.00000
O151 O O_3_z 0.27050 0.25840 0.78450 0.00000
Si152 Si Si3 0.79510 0.54820 0.74217 0.00000
Si153 Si Si3 0.70550 0.71120 0.71483 0.00000
O154 O O_3_z 0.59230 0.92680 0.89923 0.00000
O155 O O_3_z 0.59420 0.72240 0.73560 0.00000
O156 O O_3_z 0.77120 0.87890 0.88797 0.00000
O157 O O_3_z 0.72880 0.98000 0.67447 0.00000
O158 O O_3_z 0.77050 0.75840 0.78450 0.00000
Si159 Si Si3 0.70490 0.95180 0.90883 0.00000
Si160 Si Si3 0.79450 0.78880 0.88150 0.00000
O161 O O_3_z 0.90770 0.57320 0.73257 0.00000
O162 O O_3_z 0.90580 0.77760 0.90227 0.00000
O163 O O_3_z 0.72880 0.62110 0.72130 0.00000
O164 O O_3_z 0.77120 0.52000 0.84113 0.00000
O165 O O_3_z 0.72950 0.74160 0.95117 0.00000
Si166 Si Si3 0.20490 0.45180 0.90883 0.00000
Si167 Si Si3 0.29450 0.28880 0.88150 0.00000
O168 O O_3_z 0.40770 0.07320 0.73257 0.00000
O169 O O_3_z 0.40580 0.27760 0.90227 0.00000
O170 O O_3_z 0.22880 0.12110 0.72130 0.00000
O171 O O_3_z 0.27120 0.02000 0.84113 0.00000
O172 O O_3_z 0.22950 0.24160 0.95117 0.00000
Si173 Si Si3 0.29510 0.95180 0.90883 0.00000
Si174 Si Si3 0.20550 0.78880 0.88150 0.00000
O175 O O_3_z 0.09230 0.57320 0.73257 0.00000
O176 O O_3_z 0.09420 0.77760 0.90227 0.00000
O177 O O_3_z 0.27120 0.62110 0.72130 0.00000
O178 O O_3_z 0.22880 0.52000 0.84113 0.00000
O179 O O_3_z 0.27050 0.74160 0.95117 0.00000
Si180 Si Si3 0.79510 0.45180 0.90883 0.00000
Si181 Si Si3 0.70550 0.28880 0.88150 0.00000
O182 O O_3_z 0.59230 0.07320 0.73257 0.00000
O183 O O_3_z 0.59420 0.27760 0.90227 0.00000
O184 O O_3_z 0.77120 0.12110 0.72130 0.00000
O185 O O_3_z 0.72880 0.02000 0.84113 0.00000
O186 O O_3_z 0.77050 0.24160 0.95117 0.00000
Si187 Si Si3 0.70490 0.04820 0.74217 0.00000
Si188 Si Si3 0.79450 0.21120 0.71483 0.00000
O189 O O_3_z 0.90770 0.42680 0.89923 0.00000
O190 O O_3_z 0.90580 0.22240 0.73560 0.00000
O191 O O_3_z 0.72880 0.37890 0.88797 0.00000
O192 O O_3_z 0.77120 0.48000 0.67447 0.00000
O193 O O_3_z 0.72950 0.25840 0.78450 0.00000
Si194 Si Si3 0.20490 0.54820 0.74217 0.00000
Si195 Si Si3 0.29450 0.71120 0.71483 0.00000
O196 O O_3_z 0.40770 0.92680 0.89923 0.00000
O197 O O_3_z 0.40580 0.72240 0.73560 0.00000
O198 O O_3_z 0.22880 0.87890 0.88797 0.00000
O199 O O_3_z 0.27120 0.98000 0.67447 0.00000
O200 O O_3_z 0.22950 0.75840 0.78450 0.00000
Si201 Si Si3 0.00000 0.27370 0.75000 0.00000
Si202 Si Si3 0.00000 0.37680 0.91550 0.00000
O203 O O_3_z 0.00000 0.30620 0.84803 0.00000
O204 O O_3_z 0.00000 0.34500 0.68310 0.00000
Si205 Si Si3 0.50000 0.77370 0.75000 0.00000
Si206 Si Si3 0.50000 0.87680 0.91550 0.00000
O207 O O_3_z 0.50000 0.80620 0.84803 0.00000
O208 O O_3_z 0.50000 0.84500 0.68310 0.00000
Si209 Si Si3 0.00000 0.72630 0.91667 0.00000
Si210 Si Si3 0.00000 0.62320 0.74883 0.00000
O211 O O_3_z 0.00000 0.69380 0.68137 0.00000
O212 O O_3_z 0.00000 0.65500 0.84977 0.00000
Si213 Si Si3 0.50000 0.22630 0.91667 0.00000
Si214 Si Si3 0.50000 0.12320 0.74883 0.00000
O215 O O_3_z 0.50000 0.19380 0.68137 0.00000
O216 O O_3_z 0.50000 0.15500 0.84977 0.00000
C217 C C_3 0.48755 0.50164 0.47804 0.00000
H218 H H
0.56691 0.50164 0.47804 0.00000
H219 H H
0.46110 0.55857 0.49807 0.00000
H220 H H
0.46110 0.45812 0.52484 0.00000
H221 H H
0.46110 0.48823 0.41120 0.00000
loop

_geom_bond_atom_site_label_1
_geom_bond_atom_site_label_2
_geom_bond_distance
_geom_bond_site_symmetry_2
_ccdc_geom_bond_type
Si1 O26 1.599 . S
Si1 O27 1.609 . S
Si1 O24 1.627 . S
Si1 O55 1.603 1_545 S
Si2 O4 1.586 . S
Si2 O7 1.611 . S
Si2 O26 1.605 . S
Si2 O172 1.594 1_554 S
O3 Si58 1.567 . S
O3 Si22 1.627 . S
O4 Si57 1.597 . S
O5 Si22 1.599 . S
O5 Si23 1.605 . S
O6 Si50 1.603 . S
O6 Si166 1.609 1_554 S
O7 Si23 1.594 . S
Si8 O19 1.599 . S
Si8 O20 1.609 . S
Si8 O17 1.627 . S
Si8 O48 1.603 . S
Si9 O11 1.586 . S
Si9 O14 1.611 . S
Si9 O19 1.605 . S
Si9 O165 1.594 1_554 S
O10 Si62 1.567 . S
O10 Si15 1.627 . S
O11 Si61 1.597 . S
O12 Si15 1.599 . S
O12 Si16 1.605 . S
O13 Si159 1.609 1_554 S
O13 Si43 1.603 1_565 S
O14 Si16 1.594 . S
Si15 O85 1.609 . S
Si15 O41 1.603 1_565 S
Si16 O18 1.586 . S
Si16 O21 1.611 . S
O17 Si66 1.567 1_655 S
O18 Si65 1.597 1_655 S
O20 Si36 1.603 . S
O21 Si81 1.594 . S
Si22 O78 1.609 . S
Si22 O34 1.603 . S
Si23 O25 1.586 . S
Si23 O28 1.611 . S
O24 Si70 1.567 . S
O25 Si69 1.597 . S
O27 Si29 1.603 1_545 S
O28 Si74 1.594 . S
Si29 O54 1.599 . S
Si29 O127 1.609 . S
Si29 O52 1.627 . S
Si29 O27 1.603 1_565 S
Si30 O32 1.586 . S
Si30 O35 1.611 . S
Si30 O54 1.605 . S
Si30 O56 1.594 . S
O31 Si66 1.567 . S
O31 Si50 1.627 . S
O32 Si65 1.597 . S
O33 Si50 1.599 . S
O33 Si51 1.605 . S
O34 Si50 1.609 . S
O35 Si123 1.594 . S
Si36 O47 1.599 . S
Si36 O120 1.609 . S
Si36 O45 1.627 . S
Si37 O39 1.586 . S
Si37 O42 1.611 . S
Si37 O47 1.605 . S
Si37 O49 1.594 . S
O38 Si70 1.567 . S
O38 Si43 1.627 . S
O39 Si69 1.597 . S
O40 Si43 1.599 . S
O40 Si44 1.605 . S
O41 Si43 1.609 . S
O41 Si15 1.603 1_545 S
O42 Si116 1.594 . S
Si43 O13 1.603 1_545 S
Si44 O46 1.586 . S
Si44 O49 1.611 . S
Si44 O186 1.594 1_554 S
O45 Si58 1.567 1_655 S
O46 Si57 1.597 1_655 S
O48 Si180 1.609 1_554 S
Si51 O53 1.586 . S
Si51 O56 1.611 . S
Si51 O179 1.594 1_554 S
O52 Si62 1.567 . S
O53 Si61 1.597 . S
O55 Si1 1.603 1_565 S
O55 Si173 1.609 1_554 S
Si57 O59 1.586 . S
Si57 O60 1.602 . S
Si57 O46 1.597 1_455 S
Si58 O59 1.598 . S
Si58 O132 1.623 . S
Si58 O45 1.567 1_455 S
O60 Si202 1.623 1_554 S
Si61 O63 1.586 . S
Si61 O64 1.602 . S
Si62 O63 1.598 . S
Si62 O136 1.623 . S
O64 Si206 1.623 1_554 S
Si65 O139 1.586 . S
Si65 O68 1.602 . S
Si65 O18 1.597 1_455 S
Si66 O67 1.598 . S
Si66 O68 1.623 . S
Si66 O17 1.567 1_455 S
O67 Si209 1.586 1_554 S
Si69 O143 1.586 . S
Si69 O72 1.602 . S
Si70 O71 1.598 . S
Si70 O72 1.623 . S
O71 Si213 1.586 1_554 S
Si73 O98 1.599 . S
Si73 O99 1.609 . S
Si73 O96 1.627 . S
Si73 O127 1.603 1_545 S
Si74 O76 1.586 . S
Si74 O79 1.611 . S
Si74 O98 1.605 . S
O75 Si130 1.567 . S
O75 Si94 1.627 . S
O76 Si129 1.597 . S
O77 Si94 1.599 . S
O77 Si95 1.605 . S
O78 Si122 1.603 . S
O79 Si95 1.594 . S
Si80 O91 1.599 . S
Si80 O92 1.609 . S
Si80 O89 1.627 . S
Si80 O120 1.603 . S
Si81 O83 1.586 . S
Si81 O86 1.611 . S
Si81 O91 1.605 . S
O82 Si134 1.567 . S
O82 Si87 1.627 . S
O83 Si133 1.597 . S
O84 Si87 1.599 . S
O84 Si88 1.605 . S
O85 Si115 1.603 1_565 S
O86 Si88 1.594 . S
Si87 O157 1.609 . S
Si87 O113 1.603 1_565 S
Si88 O90 1.586 . S
Si88 O93 1.611 . S
O89 Si138 1.567 1_655 S
O90 Si137 1.597 1_655 S
O92 Si108 1.603 . S
O93 Si153 1.594 . S
Si94 O150 1.609 . S
Si94 O106 1.603 . S
Si95 O97 1.586 . S
Si95 O100 1.611 . S
O96 Si142 1.567 . S
O97 Si141 1.597 . S
O99 Si101 1.603 1_545 S
O100 Si146 1.594 . S
Si101 O126 1.599 . S
Si101 O199 1.609 . S
Si101 O124 1.627 . S
Si101 O99 1.603 1_565 S
Si102 O104 1.586 . S
Si102 O107 1.611 . S
Si102 O126 1.605 . S
Si102 O128 1.594 . S
O103 Si138 1.567 . S
O103 Si122 1.627 . S
O104 Si137 1.597 . S
O105 Si122 1.599 . S
O105 Si123 1.605 . S
O106 Si122 1.609 . S
O107 Si195 1.594 . S
Si108 O119 1.599 . S
Si108 O192 1.609 . S
Si108 O117 1.627 . S
Si109 O111 1.586 . S
Si109 O114 1.611 . S
Si109 O119 1.605 . S
Si109 O121 1.594 . S
O110 Si142 1.567 . S
O110 Si115 1.627 . S
O111 Si141 1.597 . S
O112 Si115 1.599 . S
O112 Si116 1.605 . S
O113 Si115 1.609 . S
O113 Si87 1.603 1_545 S
O114 Si188 1.594 . S
Si115 O85 1.603 1_545 S
Si116 O118 1.586 . S
Si116 O121 1.611 . S
O117 Si130 1.567 1_655 S
O118 Si129 1.597 1_655 S
Si123 O125 1.586 . S
Si123 O128 1.611 . S
O124 Si134 1.567 . S
O125 Si133 1.597 . S
O127 Si73 1.603 1_565 S
Si129 O131 1.586 . S
Si129 O132 1.602 . S
Si129 O118 1.597 1_455 S
Si130 O131 1.598 . S
Si130 O204 1.623 . S
Si130 O117 1.567 1_455 S
Si133 O135 1.586 . S
Si133 O136 1.602 . S
Si134 O135 1.598 . S
Si134 O208 1.623 . S
Si137 O211 1.586 . S
Si137 O140 1.602 . S
Si137 O90 1.597 1_455 S
Si138 O139 1.598 . S
Si138 O140 1.623 . S
Si138 O89 1.567 1_455 S
Si141 O215 1.586 . S
Si141 O144 1.602 . S
Si142 O143 1.598 . S
Si142 O144 1.623 . S
Si145 O170 1.599 . S
Si145 O171 1.609 . S
Si145 O168 1.627 . S
Si145 O199 1.603 1_545 S
Si146 O148 1.586 . S
Si146 O151 1.611 . S
Si146 O170 1.605 . S
O147 Si202 1.567 . S
O147 Si166 1.627 . S
O148 Si201 1.597 . S
O149 Si166 1.599 . S
O149 Si167 1.605 . S
O150 Si194 1.603 . S
O151 Si167 1.594 . S
Si152 O163 1.599 . S
Si152 O164 1.609 . S
Si152 O161 1.627 . S
Si152 O192 1.603 . S
Si153 O155 1.586 . S
Si153 O158 1.611 . S
Si153 O163 1.605 . S
O154 Si206 1.567 . S
O154 Si159 1.627 . S
O155 Si205 1.597 . S
O156 Si159 1.599 . S
O156 Si160 1.605 . S
O157 Si187 1.603 1_565 S
O158 Si160 1.594 . S
Si159 O13 1.609 1_556 S
Si159 O185 1.603 1_565 S
Si160 O162 1.586 . S
Si160 O165 1.611 . S
O161 Si210 1.567 1_655 S
O162 Si209 1.597 1_655 S
O164 Si180 1.603 . S
O165 Si9 1.594 1_556 S
Si166 O178 1.603 . S
Si166 O6 1.609 1_556 S
Si167 O169 1.586 . S
Si167 O172 1.611 . S
O168 Si214 1.567 . S
O169 Si213 1.597 . S
O171 Si173 1.603 1_545 S
O172 Si2 1.594 1_556 S
Si173 O198 1.599 . S
Si173 O196 1.627 . S
Si173 O55 1.609 1_556 S
Si173 O171 1.603 1_565 S
Si174 O176 1.586 . S
Si174 O179 1.611 . S
Si174 O198 1.605 . S
Si174 O200 1.594 . S
O175 Si210 1.567 . S
O175 Si194 1.627 . S
O176 Si209 1.597 . S
O177 Si194 1.599 . S
O177 Si195 1.605 . S
O178 Si194 1.609 . S
O179 Si51 1.594 1_556 S
Si180 O191 1.599 . S
Si180 O189 1.627 . S
Si180 O48 1.609 1_556 S
Si181 O183 1.586 . S
Si181 O186 1.611 . S
Si181 O191 1.605 . S
Si181 O193 1.594 . S
O182 Si214 1.567 . S
O182 Si187 1.627 . S
O183 Si213 1.597 . S
O184 Si187 1.599 . S
O184 Si188 1.605 . S
O185 Si187 1.609 . S
O185 Si159 1.603 1_545 S
O186 Si44 1.594 1_556 S
Si187 O157 1.603 1_545 S
Si188 O190 1.586 . S
Si188 O193 1.611 . S
O189 Si202 1.567 1_655 S
O190 Si201 1.597 1_655 S
Si195 O197 1.586 . S
Si195 O200 1.611 . S
O196 Si206 1.567 . S
O197 Si205 1.597 . S
O199 Si145 1.603 1_565 S
Si201 O203 1.586 . S
Si201 O204 1.602 . S
Si201 O190 1.597 1_455 S
Si202 O203 1.598 . S
Si202 O60 1.623 1_556 S
Si202 O189 1.567 1_455 S
Si205 O207 1.586 . S
Si205 O208 1.602 . S
Si206 O207 1.598 . S
Si206 O64 1.623 1_556 S
Si209 O212 1.602 . S
Si209 O67 1.586 1_556 S
Si209 O162 1.597 1_455 S
Si210 O211 1.598 . S
Si210 O212 1.623 . S
Si210 O161 1.567 1_455 S
Si213 O216 1.602 . S
Si213 O71 1.586 1_556 S
Si214 O215 1.598 . S
Si214 O216 1.623 . S
C217 H218 1.100 . S
C217 H219 1.100 . S
C217 H220 1.100 . S
C217 H221 1.100 . S

Issue with the networkx newer than 2.3

Hi,
I just realized the lammps_interface is not working with networkx version 2.40 which has been installed as the latest version. I had to downgrade to version 2.30 for having the code working. I still did not fully investigate the source of issue but I think it would be related to the removal of depreciated functions in the latest version:
https://networkx.github.io/documentation/stable/release/release_2.4.html

Thus, I think a quick fix for now would be putting a limitation on the version of networkx.
My best,
Pezhman

Cannot install lammps-interface by PyPI

I try to use pip install lammps-interface command but there are some errors.

Collecting lammps-interface
Using cached lammps-interface-0.2.1.tar.gz (101 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\li\miniconda3\python.exe' -c 'import io, os, sys,
setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\li\AppData\Local\
Temp\pip-install-ej_l3177\lammps-interface_c00043258eb44aaca9a694301619e513\s
etup.py'"'"'; file='"'"'C:\Users\li\AppData\Local\Temp\pip-inst
all-ej_l3177\lammps-interface_c00043258eb44aaca9a694301619e513\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file)
else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read
().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file,
'"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\li\AppData\Local\Temp\pip
-pip-egg-info-pvps1vjz'
cwd: C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-
interface_c00043258eb44aaca9a694301619e513
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-in
terface_c00043258eb44aaca9a694301619e513\setup.py", line 24, in
long_description=open('README.md').read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1640: ill
egal multibyte sequence
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f5/7a/c14e515bcf5f81
a823814fcc99f14f68ec3fd73e974eabfb5ec9d2f139af/lammps-interface-0.2.1.tar.gz#sha
256=bd2a36bce5ad6ae2bb246526e6b38dc8be11a3372975a6edb070d21392cfa9ac (from https
://pypi.org/simple/lammps-interface/) (requires-python:>=3.6). Command errored o
ut with exit status 1: python setup.py egg_info Check the logs for full command
output.
Using cached lammps-interface-0.2.0.tar.gz (101 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\li\miniconda3\python.exe' -c 'import io, os, sys,
setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\li\AppData\Local\
Temp\pip-install-ej_l3177\lammps-interface_fa23a47c3597443a84cf9d9de9d66b35\s
etup.py'"'"'; file='"'"'C:\Users\li\AppData\Local\Temp\pip-inst
all-ej_l3177\lammps-interface_fa23a47c3597443a84cf9d9de9d66b35\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file)
else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read
().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file,
'"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\li\AppData\Local\Temp\pip
-pip-egg-info-mu7effyi'
cwd: C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-
interface_fa23a47c3597443a84cf9d9de9d66b35
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-in
terface_fa23a47c3597443a84cf9d9de9d66b35\setup.py", line 24, in
long_description=open('README.md').read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1640: ill
egal multibyte sequence
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fb/d9/7fd305737dadcb
f9e48a3551250c9468f266a4d0a62842be02871e44c55a/lammps-interface-0.2.0.tar.gz#sha
256=dbd9c48d9c7c830e3e4b83f48eba198b5957d6729d086b7f776233e9bc71184f (from https
://pypi.org/simple/lammps-interface/) (requires-python:>=3.6). Command errored o
ut with exit status 1: python setup.py egg_info Check the logs for full command
output.
Using cached lammps-interface-0.1.3.tar.gz (100 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\li\miniconda3\python.exe' -c 'import io, os, sys,
setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\li\AppData\Local\
Temp\pip-install-ej_l3177\lammps-interface_126c0c4b388f4fcf95c012720cc306ba\s
etup.py'"'"'; file='"'"'C:\Users\li\AppData\Local\Temp\pip-inst
all-ej_l3177\lammps-interface_126c0c4b388f4fcf95c012720cc306ba\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file)
else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read
().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file,
'"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\li\AppData\Local\Temp\pip
-pip-egg-info-glzk1zn9'
cwd: C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-
interface_126c0c4b388f4fcf95c012720cc306ba
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-in
terface_126c0c4b388f4fcf95c012720cc306ba\setup.py", line 24, in
long_description=open('README.md').read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1640: ill
egal multibyte sequence
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e0/01/b29a3d37ab758e
8e14696c528253ca4ee3cc47212b1486670a7af5597e7d/lammps-interface-0.1.3.tar.gz#sha
256=2d8a90bdb70b8590fe352ebf02ec815dde38ead20c5ebc071b9002a939a7273c (from https
://pypi.org/simple/lammps-interface/). Command errored out with exit status 1: p
ython setup.py egg_info Check the logs for full command output.

Are there any pre-requirements to install this modules?

keeping box fixed

awesome tool!

how can we modify the resulting in.mof_name LAMMPS input file to keep the box fixed during the structural relaxation?
we tried deleting the lines associated with relax/box, but the box still changed!

thanks!

CIF file format

Hi Pete,

This might be a trivial request.

I ran your program with the CIF file I downloaded from CCDC website. It gave me this error message:

ruhil@DESKTOP-FG68KVR /cygdrive/d/lammps_interface$ python lammps_interface.py TEPGUS.cif
Traceback (most recent call last):
File "D:\lammps_interface\CIFIO.py", line 59, in read
key, val = line.strip().split()
ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "lammps_interface.py", line 10, in
cell, graph = from_CIF(options.cif_file)
File "D:\lammps_interface\structure_data.py", line 1538, in from_CIF
cifobj.read(cifname)
File "D:\lammps_interface\CIFIO.py", line 61, in read
key, val = line.strip().split()[:2]
ValueError: not enough values to unpack (expected 2, got 1)

The CIF file is different from the one that you have in the test_structure dir. I have just started working with crystalline materials and CIFs. How did you generate the supercell CIF? Please let me know.

I thank you for putting your code out for the scientific community.

Ruhil

Test error :TypeError: object of type 'dictionary-keyiterator' has no len()

HI,
After installing lammps_interface, I run the code to test by typing:
>python lammps_interface.py C:\Users\Cloud-win10\Desktop\lammps_interface\IRMOF-1.cif
but errors is throwed:
`C:\Users\Cloud-win10\Desktop\lammps_interface>python lammps_interface.py C:\Users\Cloud-win10\Desktop\lammps_interface\IRMOF-1.cif

No bonds reported in cif file - computing bonding..

Traceback (most recent call last):
File "lammps_interface.py", line 11, in
sim.set_graph(graph)
File "C:\Users\Cloud-win10\Desktop\lammps_interface\lammps_interface\lammps_main.py", line 375, in set_graph
self.graph.compute_topology_information(self.cell, self.options.tol, self.options.neighbour_size)
File "C:\Users\Cloud-win10\Desktop\lammps_interface\lammps_interface\structure_data.py", line 953, in compute_topology_information
self.compute_init_typing()
File "C:\Users\Cloud-win10\Desktop\lammps_interface\lammps_interface\structure_data.py", line 577, in compute_init_typing
if len(neighbours) >= 2:

TypeError: object of type 'dictionary-keyiterator' has no len()`

I am a new for python. Cloud you help me ?
thanks a lot.
@peteboyd

Missing files in sdist

It appears that the manifest is missing at least one file necessary to build
from the sdist for version 0.1.2. You're in good company, about 5% of other
projects updated in the last year are also missing files.

+ /tmp/venv/bin/pip3 wheel --no-binary lammps-interface -w /tmp/ext lammps-interface==0.1.2
Looking in indexes: http://10.10.0.139:9191/root/pypi/+simple/
Collecting lammps-interface==0.1.2
  Downloading http://10.10.0.139:9191/root/pypi/%2Bf/a43/e5db5b36c7613/lammps-interface-0.1.2.tar.gz (105 kB)
    ERROR: Command errored out with exit status 1:
     command: /tmp/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-1c5jig3n/lammps-interface/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-1c5jig3n/lammps-interface/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-wheel-1c5jig3n/lammps-interface/pip-egg-info
         cwd: /tmp/pip-wheel-1c5jig3n/lammps-interface/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-wheel-1c5jig3n/lammps-interface/setup.py", line 3, in <module>
        with open('requirements.txt') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Extending FF verbosity to allow easier manual post-modification of lmp.data file ?

Dear contributors of LAMMPS-Interface.
I have been using this code for around a year already and I am very pleased with the results. Thank you all for this excellent work.
I always have to modify the topology though, in order to describe properly the crystal structure of the Metal-Phosphonate MOFs that I synthesize in the lab.

I usually have to do one of these two things.

1)Either I define, new atom types, bonds, angles, etc and manually change the topology of the unit-cell until I am done, and then I replicate the cell with other external codes like OVITO and export the new lmp.data file of the supercell.

or

  1. I modify the CIF file of my structures and replace some atoms that need higher verbosity with dummy atoms so lammps-interface attach to them different FF parameters, that I later modify manually (again after that I replicate with same methodology as in case 1)

I should also add that I start with the UFF force field in order to get parameters for all types of atoms, and later I modify a lot of stuff. I add DFT calculated bond and angle terms. I add the partial charges calculated via plane wave DFT. I replace the UFF Lennard-Jones parameters with the OPLS parameters except for metal ions that I keep them UFF. This way I get the minima and overall structure closer to the original crystal structure of my materials.

My experience as a simple user of this code leads me naturally to the idea that it would be very beneficial to add the following features:

1)Add 2-3 levels of verbosity for FF parameterization minimum (as it is), Medium, High
2)It would also help if there was the choice to export the lmp.data file with empty tables for the FF parameters but the topology printed as described above in order for the user to add their own parameters

Either way, great work guys.
I hope that with the years lammps-interface will evolve along with us :)

TypeError: 'method' object is not iterable

Hi,

I was having this error when executing lammps_interface in the command line:

File "/usr/local/bin/lammps_interface", line 14, in
sim.assign_force_fields()
File "/home/user/Documents/programs/lammps_interface/lammps_interface/lammps_main.py", line 442, in assign_force_fields
param = getattr(ForceFields, self.options.force_field)(**attr)
File "/home/user/Documents/programs/lammps_interface/lammps_interface/ForceFields.py", line 3144, in init
self.compute_force_field_terms()
File "/home/user/Documents/programs/lammps_interface/lammps_interface/ForceFields.py", line 53, in compute_force_field_terms
self.compute_atomic_pair_terms()
File "/home/user/Documents/programs/lammps_interface/lammps_interface/ForceFields.py", line 60, in compute_atomic_pair_terms
charges = not np.allclose(0.0, [float(self.graph.node[i]['charge']) for i in list(self.graph.nodes)], atol=0.00001)
TypeError: 'method' object is not iterable

To solve this, I added "()" to "self.graph.nodes" in the 60th line of ForceFields.py, and 306th line of lammps_main.py:
charges = not np.allclose(0.0, [float(self.graph.node[i]['charge']) for i in list(self.graph.nodes())], atol=0.00001)

Best regards

Invalid atom ID in the dihedral section of the datafile

Dear lammps-interface community,

I am getting the following error while performing MD simulations using the data file generated by lammps-interface:

ERROR on proc 19: Invalid atom ID in Dihedrals section of data file (../atom.cpp:1432)

To generate the MD data files, I'm using UFF as the force field and 333 replication of the unit cell. I would love to receive any help with this.

error running test

Hi,
I installed last version of lammps-interface present in github repository, but running the example I receive this error:

Traceback (most recent call last):
File "/usr/local/bin/lammps-interface", line 33, in
sys.exit(load_entry_point('lammps-interface==0+unknown', 'console_scripts', 'lammps-interface')())
File "/usr/local/bin/lammps-interface", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/cli.py", line 3, in
from .lammps_main import LammpsSimulation
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/lammps_main.py", line 11, in
from . import ForceFields
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/ForceFields.py", line 25, in
from .Molecules import *
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/Molecules.py", line 7, in
from .structure_data import MolecularGraph
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/structure_data.py", line 14, in
from .mof_sbus import InorganicCluster, OrganicCluster
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/mof_sbus.py", line 1553, in
add_distance_matrix(InorganicCluster['Cu']['Cu Paddlewheel'])
File "/usr/local/lib/python3.10/dist-packages/lammps_interface-0+unknown-py3.10.egg/lammps_interface/mof_sbus.py", line 11, in add_distance_matrix
if(float('.'.join(nx.version.split('.')[:2])) >= 2.0):
ValueError: could not convert string to float: '3.0rc1'

How could I fix.it?
Regards

Alberto

InputHandler.py error

Hi,

When I run the program in the Linux system with Anaconda python 2.7. I got an error,
"./subprocess.py", line 1335, in _execute_child raise child_exception
OSError: [Errno 2] No such file or directory.

This error is coming from line 10 of InputHandler.py file.
Do you have any ideas about this?

Thanks a lot,
Zesheng

force_field.def file for RASPA

Dear all,
first of all, thanks for this good project.

When i read the output of lammps-interface --help, it is mentioned that -or function will also write force_field.def together with force_field_mixing_rules.def and pseudo_atoms.def. But i couldn't obtain force_field.def file for RASPA. I looked source code but didn't find any code about this file. Is there something i am missing?

merdan

add basic tests

so far, this repository has zero tests, which means it is very easy to break existing functionality during updates.

we need to add at least a few basic tests

cut_molecule

Dear all,
I was trying to use the lammps interface with the test cif IRMOF-1.cif you provide in the test folder (as well as with some other cifs). For all the tested cif files I get this error message:
_main.py", line 1532, in cut_molecule
mgraph.coordinates = self.graph.coordinates[indices,:].copy()
TypeError: 'NoneType' object is not subscriptable
I would be very glad for help to fix this issue.
Kind regards,
Michelle Ernst

maximum recursion depth exceeded

For some MOFs with certain complexity the program crashed with this warnning "Python Maximum recursion depth exceeded". I have solve the problem incrementing the stack depth allowed with this "sys.setrecursionlimit(10000)".

KeyError: 'OW' while using --insert-molecule

Hi,
I am encountered KeyError: 'OW' while using --insert-molecule while using --insert-molecule TIP4P water. The .cif file is Okey for convert by lammps_interface.

Thanks!
Zhongming

[zeng@localhost lammps_interface]$ python lammps_interface.py HfBTB-MOL-Ni0.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.
Files created! -> /home/zeng/lammps_interface

[zeng@localhost lammps_interface]$ python lammps_interface.py HfBTB-MOL-Ni0.cif -ff UFF4MOF --insert-molecule TIP4P_Water
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.
Traceback (most recent call last):
  File "lammps_interface.py", line 21, in <module>
    sim.write_lammps_files()
  File "/home/zeng/lammps_interface/lammps_interface/lammps_main.py", line 742, in write_lammps_files
    self.molecule_template(self.options.insert_molecule)
  File "/home/zeng/lammps_interface/lammps_interface/lammps_main.py", line 527, in molecule_template
    cutoff=self.options.cutoff)
  File "/home/zeng/lammps_interface/lammps_interface/ForceFields.py", line 3133, in __init__
    self.compute_force_field_terms()
  File "/home/zeng/lammps_interface/lammps_interface/ForceFields.py", line 53, in compute_force_field_terms
    self.compute_atomic_pair_terms()
  File "/home/zeng/lammps_interface/lammps_interface/ForceFields.py", line 61, in compute_atomic_pair_terms
    self.pair_terms(n, data, self.cutoff)
  File "/home/zeng/lammps_interface/lammps_interface/ForceFields.py", line 3138, in pair_terms
    data['pair_potential'].eps = UFF4MOF_DATA[data['force_field_type']][3]
KeyError: 'OW'

Regarding dihedral torsional barrier value

Dear Developers,

Hope you all are safe in the global pandemic.

I am new to lammps interface and want to use it to study flexible MOFs. First I tried it to generate lammps input file for a simple system of one ethane molecule in a big box. It generated two files and in the "dihedral coeff" section of data file I found following lines:

Dihedral Coeffs

1        0.066219               1               3 # H_ C_3 C_3 H_

According to my understanding of UFF paper, the 0.5*rotational_barrier value should be 0.5*2.119/9 = 0.1177, where 2.119 is sp3 torsional barrier for C_3 and 9 is the number of torsions present about C_3 C_3 bond. Lammps-interface is giving value of 0.066219, which I guess might be due to over counting of the number of torsions as 16, i.e. 0.5*2.119/16 = 0.066219 but want to confirm from you. Please clear my doubt regarding this, your reply will be very helpful.

Thanks

Abhishek

Invalid atom ID in Dihedrals section of data file

Maybe this isn't the right place to post this, but I figured I would give it a shot.

LAMMPS throws the error in the title for a structure I'm working on. I've been able to verify in the generated data file that each atom ID in the Dihedrals section corresponds to an atom in the Atoms section, so I'm at a loss for why LAMMPS throws this error. The structure itself is unphysical in that some of the atoms are too close to each other, so I'm not surprised there would be difficulties, but it seems like a strange error to have when all of the atom IDs match. Could someone advise on how to proceed?

Code breaks with mislabeled '_atom_site_description' tag in cif file

The program reads this cif keyword in as the atom's force_field_type, despite it not being designed for that intended purpose. In cases where some random string is put here such as 'Cu0', the program will try to find the appropriate force-field type in one of the force field dictionaries. Eg. UFF has 'Cu3+2' so a KeyError is raised when searching for 'Cu0'.

New maintainer wanted!

lammps_interface is currently effectively unmaintained.

In order to keep the package functional and improve it, a new maintainer will be needed (in my last email exchange with Pete Boyd, the original author of this package, he also expressed this intention).
If you are interested in helping out with this, just let us know here and start, e.g. by taking on one of the open issues you think you can fix.

Undesired atom type assignment of aluminium with UFF4MOF

Thanks a lot for this tool, very useful!

There is however, one MOF is giving me problems: MFM-300(Al), taking the cleaned up cif from the CoRe MOF database, XUPSAE_clean.

I passed it through Lammps Interface using the command "lammps-interface -ff UFF4MOF XUPSAE_clean.cif" and it seems it couldn't decide an atom type for aluminium as it returns the following:

WARNING: Could not find an appropriate UFF4MOF type for Al. Assigning Al3
WARNING: Could not find an appropriate UFF4MOF type for Al. Assigning Al6+3
WARNING: Could not find an appropriate UFF4MOF type for Al. Assigning Al3f2
WARNING: Could not find an appropriate UFF4MOF type for Al. Assigning Al3
WARNING: Could not find an appropriate UFF4MOF type for Al. Assigning Al6+3
WARNING: Could not find an appropriate UFF4MOF type for Al. Assigning Al3f2
................................................................................................................................................................

This sequence repeats several times and in the end, it chooses Al3f2, which is for tetrahedrally coordinated aluminium, rather than the expected octahedral Al6+3.

Oxygen number n type cannot be detected!

Upon runnin the following command:

$ lammps-interface -ff MOF_FF HKUST-1.cif

With the attached file, the following output is produced:

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
No bonds reported in cif file - computing bonding..
totatomlen = 672
compute_topology_information()
func: cartesian_coordinates; Elps. 0.011s
func: min_img_distances; Elps. 2.995s
func: compute_bonding; Elps. 4.097s
func: init_typing; Elps. 4.293s
func: bond_typing; Elps. 4.304s
Detecting Inorganic clusters
Found Cu Paddlewheel
Found Cu Paddlewheel
<...>
Found Cu Paddlewheel
func: detect_clusters; Elps. 27.125s
func: angles; Elps. 27.129s
func: dihedrals; Elps. 27.134s
func: improper_dihedrals; Elps. 27.139s
Oxygen number 49 type cannot be detected!

First of all I am unsure why there is a Git fatality, even though Git has not been initiated in the respective folder. Nonetheless, other examples run until completion while also producing this error message, so I suspect this is not the issue.

The issue occurs with all of the structure files I have tried so far, including the one from http://www.crystallography.net/cod/2300380.html (after trimming a couple of irrelevant lines). Assistance would be much appreciated!

extend UFF4MOF parameters

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

Unable to generate lammps file for UiO-66 with BTW_FF, Dubbeldam and Dreiding

Dear Pete,

First of all I would like to thank you for sharing your code with the scientific community.

I recently started testing it on a structure of UiO-66 I optimized in VASP. Things went smoothly with UFF and UFF4MOF and I obtained correct lamps input files. I then tested the same structure for the Dubbeldam, Dreiding, and BTW_FF force fields using the same command line (e.g., python lammps_interface.py --force_field Dubbeldam UiO-66.cif) but I experienced some issues.

In the case of Dreiding I get an error message that the force field for atom 433 with element 'Zr' is missing and for Dubbeldam and BTW_FF the script just prints "Detecting inorganic clusters" and then hangs forever never printing more output.

I would appreciate any help on how to solve this issue and would be happy to provide you with my cif file and any additional information you might find helpful.

Thanks in advance.

Kind Regards,
Martina

--
Martina Lessio, Ph.D.
University of Sydney Fellow, Postdoctoral Research Associate
School of Chemistry
University of Sydney
E: [email protected]

Sulfur atom typing incomplete for sp3 hybridization

See the trace for UFF4MOF:

Traceback (most recent call last):
  File "/Users/kutay.sezginel/anaconda3/envs/flex/bin/lammps-interface", line 33, in <module>
    sys.exit(load_entry_point('lammps-interface', 'console_scripts', 'lammps-interface')())
  File "/Users/kutay.sezginel/kutay/git/lammps_interface/lammps_interface/cli.py", line 17, in main
    sim.assign_force_fields()
  File "/Users/kutay.sezginel/kutay/git/lammps_interface/lammps_interface/lammps_main.py", line 441, in assign_force_fields
    param = getattr(ForceFields, self.options.force_field)(**attr)
  File "/Users/kutay.sezginel/kutay/git/lammps_interface/lammps_interface/ForceFields.py", line 3144, in __init__
    self.compute_force_field_terms()
  File "/Users/kutay.sezginel/kutay/git/lammps_interface/lammps_interface/ForceFields.py", line 53, in compute_force_field_terms
    self.compute_atomic_pair_terms()
  File "/Users/kutay.sezginel/kutay/git/lammps_interface/lammps_interface/ForceFields.py", line 62, in compute_atomic_pair_terms
    self.pair_terms(n, data, self.cutoff, charges=charges)
  File "/Users/kutay.sezginel/kutay/git/lammps_interface/lammps_interface/ForceFields.py", line 3152, in pair_terms
    data['pair_potential'].eps = UFF4MOF_DATA[data['force_field_type']][3]
KeyError: 'S_3'

There are 3 different S_3 atom types for UFF4MOF:

    "S_3+2": (1.064, 92.1, 4.035, 0.274, 13.969, 2.703, 0.484, 1.25, 6.928, 4.486, 1.047),
    "S_3+4": (1.049, 103.2, 4.035, 0.274, 13.969, 2.703, 0.484, 1.25, 6.928, 4.486, 1.047),
    "S_3+6": (1.027, 109.47, 4.035, 0.274, 13.969, 2.703, 0.484, 1.25, 6.928, 4.486, 1.047),

which correspond to the following geometries

S_3+2 ch3sch3 Bent two-coordinated sulfur (sp3), two single bonds
S_3+4 socl2 Pyramidal three-coordinated hypervalent sulfur
S_3+6 so2cl2 Tetrahedral four-coordinated hypervalent sulfur

It seems like in UFF S_3+6 is selected by default, I am not sure why that's the case. I think both of these force fields should have a special case for the sulfur atom. Would something like this work? (Assuming lone pair electrons are not counted as neighbors)

if data['element'] == "S":
    if self.graph.degree(node) == 4:
        data['force_field_type'] = "S_3+6"
    elif self.graph.degree(node) == 3:
        data['force_field_type'] = "S_3+4"
    elif self.graph.degree(node) == 2:
        data['force_field_type'] = "S_3+2"

I would be willing to make that change and open a PR if you think the solution above makes sense.

Change in the potential function

Hi,
Could you tell me how to change the shape of the potential when displaying parameters? I want to change some potential shapes to other ones.

Installation succeeded but failed to run

Dear Pete,

It was a amazing work for those who need to write *.data files. And Thank you for your selfless sharing.

Recently, I tried to generate the data file of IRMOF-1 with your code. However, after a successful installation, I ran the code with an error as shown in the following figure. Could you tell me what caused this problem?

I am looking forward to your reply.

Cheng
China-EU Institute for Clean and Renewable Energy at Huazhong University of Science & Technology
Email:[email protected]

image

self diffusion for UMCM-1 with 1-phenylamine

Hi,
I have a problem to combine dihedral_style and improper_style for both MOF and guest molecule. I want to calculate the mean square displacement for 1-phenylamine in UMCM-1. However, the bond style, angle style, dihedral style, and improper style for MOF generated by lammps-interface is different with 1-phenylamine generated by LigParGen (OPLS-AA force field).

Input file for MOF:
units real
atom_style full
boundary p p p

pair_style lj/cut/coul/long 12.500
bond_style harmonic
angle_style hybrid fourier cosine/periodic
dihedral_style harmonic
improper_style fourier
kspace_style ewald 0.000001

special_bonds lj/coul 0.0 0.0 1.0
dielectric 1.0
pair_modify tail yes mix arithmetic
box tilt large
read_data data.UMCM1

Input file for 1-phenyamine by Ligpargen server:
units real
atom_style full

dimension 3
boundary p p p

pair_style lj/cut/coul/cut 20.0 20.0
pair_modify mix geometric

bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style cvff
special_bonds lj/coul 0.0 0.0 0.5

read_data 1phenylamine.lmp

They have different angle_style, dihedral_style, and improper_style. How can I combine my guest molecule and MOF to simulate the MSD with different angle, dihedral, and improper styles? In addition, can I change the improper style for MOF other than fourier because it require user-misc package but our HPC do not install it?

Thanks.

recursion limit

nice job thanks,

we were running some large systems and found that thy did run in a notebook but not on the command line. I turned out the recursion limit in the notebooks is 3000 but in a plain executed script it is 1000. Maybe this should be added in the cli

we are currently trying to optimize to generate input for a 22.000 atom system. This currently takes over 10 hours. Any suggestions?

best,
Michiel

Cannot find coordination type for Zr8f4 when convert CIF of UiO type MOF

cif and log.zip
Thanks for your attention.
There is a structure of an UiO type MOF, consist of Zr cluster and BTB linker.
Now I want to use lammps_interface to convert the CIF generated by Material Studio 2017 to the lammps data file with UFF4MOF, but I got an error when I tried to.
No error with UFF, but UFF4MOF seems better for my structure.

[zeng@localhost lammps_interface]$ python lammps_interface.py -ff UFF4MOF ZrBTB-MOL-NiOPT-supercell.cif 
Molecules found in the framework, separating.
ERROR: Cannot find coordination type for Zr8f4
[zeng@localhost lammps_interface]$ python lammps_interface.py ZrBTB-MOL-NiOPT-supercell.cif 
Molecules found in the framework, separating.
WARNING: Atom 1 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 21 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 41 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 71 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 81 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 111 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 121 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 141 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 161 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 165 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 169 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 173 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 197 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 217 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 237 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 267 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 277 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 307 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 317 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 337 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 357 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 361 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 365 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Atom 369 element Zr has 8 neighbors, but was assigned Zr3+4 as a force field type!
WARNING: Molecule 1 with atoms (Ni, O, H, H, O, H, H) will be using the UFF force field as no  value was set for molecules. To prevent this warning set --molecule-ff=[some force field] on the command line.
WARNING: Atom 393 element Ni has 2 neighbors, but was assigned Ni4+2 as a force field type!
Files created! -> /home/zeng/lammps_interface

Improve CIF parser to accept symmetric MOFs.

I think the CIF parser can be improved to accept non-P1 MOFs. ASE Python library has a pretty good CIF parser so that can be used to read MOFs or even other crystals. Moreover, it can read many file formats, allowing other file formats to be accepted. I would be willing to work on this.

Unit cell being expanded when not needed?

Hello,

I may be wrong here, but I think there may be an issue with Lammps interface expanding unit cells to reach a desired cutoff when it is not needed.

My example is using a 2x2x2 supercell of ZIF-8, which has the following unit cell parameters after expansion:

_cell_length_a 29.472600
_cell_length_b 29.560200
_cell_length_c 29.528000
_cell_angle_alpha 109.610200
_cell_angle_beta 109.469200
_cell_angle_gamma 109.356400

I have calculated the perpendicular lengths to be:

ab_perpendicular_length=27.8893
ba_perpendicular_length=27.8067
ac_perpendicular_length=27.8396
ca_perpendicular_length=27.7874
bc_perpendicular_length=27.8153
cb_perpendicular_length=27.8456

From the above, I believe my desired cutoff of 12.8 Angstrom should work without the need for further expansion. However, Lammps Interface subjects it to a further 2x2x2 expansion (= 4x4x4 overall). The message is:

WARNING: unit cell is not large enough to support a non-bonded cutoff of 12.10 Angstroms.
Re-sizing to a 2 x 2 x 2 supercell.
Prog. = 1/8; cell = 0x0x0
Prog. = 2/8; cell = 0x0x1
Prog. = 3/8; cell = 0x1x0
Prog. = 4/8; cell = 0x1x1
Prog. = 5/8; cell = 1x0x0
Prog. = 6/8; cell = 1x0x1
Prog. = 7/8; cell = 1x1x0
Prog. = 8/8; cell = 1x1x1

As I said, I may have missed something, so please let me know if there is something wrong with my calculations.

0 neighbors found for Zr atoms in UiO-66 structure

Hello dear community,

I am trying to parametrize a UiO-66 mof using lammps-interface. This UiO-66 structure was obtained from CSD and has the deposition number 733458. I added H bonds on the linkers using the MOFUN software (attached here is the CIF file). 733458-H.cif.txt

When performing lammps-interface 733458-H.cif, the program does not find any neighbors with Zr atoms. Thus counting the cif file as having "2 molecules"

image

image

From the images, we see Zr is considered "Molecule 1" and all other atoms as "Molecule 2". Because of this, no bonding terms are made with Zr.

When visualizing the structure using VESTA, the Zr-O bond distance is 2.3358 A, which is normal.
image

I tried lammps-interface 733458-H.cif --neighbor-sze 8, but this didn't change the results.

May I kindly ask if there are any additional command-line options I should do for Zr to bond with the other atoms? (specifically O atoms)

undesired bonds when using --replication for frameworks with molecules

Hi, I am experiencing a weird situation that when I am using --replication to generate a supercell of a framework (with molecules in the structure), the framework is also treated as a molecule during replication. Thus, the final structure consisted of long bonds between clusters that were initially extending out of the unit cells. How can I solve this problem? The snapshot of the final structure is attached.

Thanks!!

Screen Shot 2022-12-14 at 10 36 37

lammps datafile for UFF - redefinition of the unitcell

Dear,

Willing to generate the UFF datafile for Lammps for the structure in attachment, I get the message 'bonded atoms (nr) and (nr) are 7.730 Angstroms apart. This probably has something to do with the redefinition of the unitcell to a supercell. Please contact the developers!'

The final files, which I hoped to get, have not been generated and the program hangs. I attached the input structures (pdf and cif, which I had to use in the program) in attachment.
problem_uff.zip

Remark that the structure consists out of layers, and that inside each layer a compound is used, which has symmetry. For completeness, I attached as well this symmetric part of the compound in one layer (*_ori_cif.zip).
PR122_ori_cif.zip

Can you please have a look at it?

Thank you!

Stefan

update readthedocs config

The Read the Docs build system will start requiring a configuration file v2 (.readthedocs.yaml) starting on September 25, 2023.

Inconsistent atom types from published work and from lammps_interface.py

Hi Peter.

Thank you for sharing the code.
I tried to redo some of the simulations published in your recent article Force-Field Prediction of Materials Properties in Metal-OrganicFrameworks

I started with IRMOF-1 series. I converted the data file data. IRMOF-1.repeat to cif using topotools , obabel. Then I used the lammps_interface.py to obtain the data file.

I found the atom types corresponding to Dreiding forcefield used in the original paper does not match the one obtained by using lammps_interface.py.

Published work (IRMOF-1. repeat Direiding)
Step E_vdwl E_coul E_pair E_bond E_angle E_dihed E_impro
0 506.73555 -14322.243 -13815.507 678.80669 209.03348 2.0872193e-13 15360

From lammps_interface.py

Step E_vdwl E_coul E_pair E_bond E_angle E_dihed E_impro
0 506.80088 0 506.80088 708.09748 280.49672 1.9914626e-13 0

I am more interested in the inconsistency between angle, dihedral, improper energies.
one additional angle type is missing in the second one and O3 is identified as O2.

It would be helpful if you could clarify this
Arun

How to obtain the charge of each atom of MOFs?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.