Dear All,
I’m currently working on a project involving the elongation of a Carbon nanotube (CNT). In this setup, carbon atoms within the nanotube are connected by harmonic potentials, and I’m adjusting the bond coefficients to control these potentials. The length of the CNT, denoted as L, changes as a result of the forces applied to both ends in opposite directions.
To systematically vary the bond coefficients and repeat the CNT elongation experiment, I’ve implemented a loop in my simulation script:
label loop
variable a loop 15
variable b equal 100*${a}
bond_coeff 1 ${b} 0.77
next a
jump SELF loop
In this loop, variable “a” iterates through 15 values, and “b” calculates the bond coefficient based on each value of “a”. The bond coefficient is then updated accordingly.
To output the length of the CNT (v_L) for each iteration of the loop, I’ve been using the following command:
fix at2 all ave/time 10 100 1000 v_L file len{a}.dat
However, analyzing the output data files becomes challenging because it’s not immediately clear which length values correspond to which bond coefficient. I’m seeking a better approach to create an output data file that includes a column for the loop step (bond coefficient) and another column for the length values. This would greatly facilitate data analysis and interpretation.
Any advice or suggestions on how to achieve this would be greatly appreciated.
Thank you for your assistance.