make data file for Hydroxylated SiO2 tip

Dear Lammps User

I am modeling a Hydroxylated SiO2 tip as below.
For making data file, I need sign charge for Si-O-H group. The Si without the OH group should be uncharged("0"charge). Does anyone know how to sign different charge for same element?

Thank you very much for any help.

Best regards

Liyi

SIOH.png

Dear Lammps User

I am modeling a Hydroxylated SiO2 tip as below.
For making data file, I need sign charge for Si-O-H group. The Si without the OH group should be uncharged("0"charge). Does anyone know how to sign different charge for same element?

use two different atom types. atom types are not required to be equivalent to elements. e.g. in bio force fields you can have 10s of different atom types for carbon atoms alone, representing the different environments and functional groups such carbon atoms can be in.

axel.

SIOH.png

Dear Lammps User

I am modeling a Hydroxylated SiO2 tip as below.
For making data file, I need sign charge for Si-O-H group. The Si without the OH group should be uncharged("0"charge). Does anyone know how to sign different charge for same element?

I'm not sure if I understood your question correctly.
You can give every atom in the data file a different charge
(regardless of it's type).
(Charge is not determined by atom type.)

There are several ways to do that:
1) Open the data file with a text-editor and edit the 4th column in
the data file (I assume you are using "atom_style full")

2) Use the set atom charge command
https://lammps.sandia.gov/doc/set.html

3) Use a molecule builder (data-file builder). Each molecule builder
different methods to control the position and charge of each atom.
Here is a list of molecule builders:
https://lammps.sandia.gov/prepost.html

Andrew

Dear Lammps User

I am modeling a Hydroxylated SiO2 tip as below.
For making data file, I need sign charge for Si-O-H group. The Si without the OH group should be uncharged("0"charge). Does anyone know how to sign different charge for same element?

use two different atom types. atom types are not required to be equivalent to elements. e.g. in bio force fields you can have 10s of different atom types for carbon atoms alone, representing the different environments and functional groups such carbon atoms can be in.
axel.

It looks like we were both typing our responses at the same time.
What Axel said is also true: The number used for each atom type is not
the same as the atomic element. In a typical force field, there are
often many different types of carbon atoms, for example. To add to
the confusion, in some force-fields (like OPLSAA), charge is
determined atom type. But LAMMPS allows you to give every atom a
different charge.

Andrew
(The sum of the charges usually must be 0.)

Dear Jewett and Axel

Thank you very much for your responds.
But my main point is how to distinguish the surface Si (with OH group) atom from the bulk (without OH group).
Even for signing different atom type for same element, it also requires distinguish them from each other. So I don’t think it is necessary to make different types for Si.

Yes,Charge is not determined by atom type. I usually write my own code to make the data file from xyz format file. But the charge assignment is a kind of tricky.

Thank you very much

Liyi

Andrew Jewett <jewett.aij@…24…> 于2020年4月11日周六 上午1:01写道:

Yes, it is not required to use different atom types, but it is good practice. It can be extremely helpful to identify the different kinds of Si atoms this way during the simulation and for analysis.

Since you are building your own data files, you are free to set the charge and atom type as you will. How to construct this, should be straightforward, as when looking at the connectivity. Especially, if you also use different atom types for the different kinds of O atoms.

Axel.

Yes, it is not required to use different atom types, but it is good practice. It can be extremely helpful to identify the different kinds of Si atoms this way during the simulation and for analysis.

Since you are building your own data files, you are free to set the charge and atom type as you will. How to construct this, should be straightforward, as when looking at the connectivity.

(See below)

, if you also use different atom types for the different kinds of O atoms.

Axel.

Dear Jewett and Axel

Thank you very much for your responds.
But my main point is how to distinguish the surface Si (with OH group) atom from the bulk (without OH group).

The easiest way is to write a short program that will loop through the list of bonds and print the ID numbers of the two atoms, whenever they both satisfy the atom-types (O and H).

To find the list of bonds you can write a for loop to read the “Bonds” section of the DATA file, or use pizza.py to read the entire data file.

Then write another loop that will use the information above to generate a list of charges (or “set atom ID charge Q” statements)

https://LAMMPS.sandia.gov/doc/set.html

If you want to write something fancier and more general, and if you are using python, you can try using “networkx” to search for subgraphs in the bond network.
https://networkx.github.io/documentation/stable/reference/algorithms/isomorphism.vf2.html

In your case, the subgraph has two bonds and one edge (O-H ). The VF2 algorithm will find a list of atom-IDs (vertices) which for all of the O-H “subgraphs” in your bond network.

If the VF2 algorithm is too slow, you can try using the following code, which is almost the same. It is written in the same style, and is much faster than VF2 for small subgraphs (like the OH group):

https://github.com/jewettaij/moltemplate/blob/master/moltemplate/nbody_graph_search.py

Andrew

Dear Andrew.

Finally,I solved the problem.
Thank you very much for your help.

Best regards

LIYI

Andrew Jewett <jewett.aij@…24…> 于2020年4月12日周日 上午4:51写道: