Hi,
I am trying to compute the VACF for my simulation using python. To do this, I want to take a time series average. To that end, I wrote a test script and write a loop where for each iteration I attempt to calculate the VACF over 1000 time steps using the “compute vacf” command. Since I want this to be a 1000 dim vector I apply a “fix vector” command and then I try to retrieve this via an “lmp.extract_fix” command. However when I run this and try to extract the fix I get a segfault and do not understand why. Is there a simple reason for this that I am missing? Thanks!
This is my exact script:
from lammps import lammps
import os
lmp = lammps()
lmp.file(“header.in”)
for j in range(0,9):
lmp.command(“compute vacf all vacf”)
lmp.command(“fix vacf all vector 1 c_vacf[4]”)
z=lmp.extract_fix(“vacf”,0,1)
print(z)
lmp.command(“run 1000 every 1000 ‘write_data test.data’”)
lmp.command(“uncompute vacf”)
lmp.command(“unfix vacf”)
The segfault error message says:
…
compute vacf all vacf
fix vacf all vector 1 c_vacf[4]
[login1:58931] *** Process received signal ***
[login1:58931] Signal: Segmentation fault (11)
[login1:58931] Signal code: Address not mapped (1)
[login1:58931] Failing at address: (nil)
…