Forum Navigation
You need to log in to create posts and topics.

Create bond for ReaxFF

Hello everybody,

 

i am doing a ReaxFF simulation and here the bonding is implicit and i would like to bond my water molecules ( oxygen to the hydrogens ) and using the pairwise cutoff does not lead to good results since the bonding length changes. My water molecules are ordered this way:

e.g.

1 H (first hydrogen of the 1st molecule )

2 O (oxygen of the first molecule )

3 H (second hydrogen of the 1st molecule )

....

100 H

101 O

102 H

...

How can i bond my oxygens with my hydrogens manually by bonding the oxygen and the two hydrogens with a particle identifier +1 and -1 ?Is it possible with ovito or do i need a full python script for that ?

Best regards

Hi Betim,

the Bond analysis modifier currently only allows to use a distance based criterion, but we are already working on extending its functionality.

In your specific case, you should still be able to solve it with this short python script modifier:

from ovito.data import *
import numpy as np

def modify(frame, data):

    bond_topology = []
    for i in range(1, 101, 3):
        bond_topology.append([i-1, i])
        bond_topology.append([i, i+1])

    data.particles_.bonds = Bonds()
    data.particles_.bonds_.create_property('Topology', data=bond_topology)