Dear OVITO users and developers,
I am using ovito to create bonds across pbc, and then export LAMMPS DATA file.
In GUI, it is easy to be done by enabling x, y, z pbc under Simulation Cell. However, I have a lot of systems to build so it would be super tedious to click click click.
So I am trying to write a python script to do that, but I met a problem in enabling pbc in python. Here is my code:
pipeline = import_file(trjs)
create_bonds_modifier = CreateBondsModifier(mode=CreateBondsModifier.Mode.Pairwise)
create_bonds_modifier.set_pairwise_cutoff(type_a=6,type_b=7,cutoff=1.01)
pipeline.modifiers.append(create_bonds_modifier)
data = pipeline.compute()
print(data.cell_.pbc) # output: False, False, False
print(data.particles.bonds.count) # output: wrong bond number
I noticed that ovito manual mentions this pbc problem, bond vectors?
but it does not mention how to use this bond vectors to create bonds.
Anyone can help me? Thanks!
Bests,
Jay