[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ESPResSo-users] stopping the simulation

From: Tarun Khanna
Subject: [ESPResSo-users] stopping the simulation
Date: Wed, 11 Jul 2012 21:31:23 +0530


Thankyou for such an early reply and sorry for incomplete description of the problem. Here I am including the script in which i am having the problem mentioned.

set n_solute 250
set n_solvent 500
set density 0.006
set box_l [expr pow($n_part/$density,1./3.)]
setmd box_l $box_l $box_l $box_l
setmd periodic 1 1 1
for {set i 0} { $i < 250 } {incr i} {
    set posx [expr $box_l*[t_random]]
    set posy [expr $box_l*[t_random]]
    set posz [expr $box_l*[t_random]]
    set vx [gauss_random]
    set vy [gauss_random]
    set vz [gauss_random]
    part $i pos $posx $posy $posz type 0 v $vx $vy $vz q 2 mass 125
for {set i 250} { $i < 750 } {incr i} {
    set posx [expr $box_l*[t_random]]
    set posy [expr $box_l*[t_random]]
    set posz [expr $box_l*[t_random]]
    set vx [gauss_random]
    set vy [gauss_random]
    set vz [gauss_random]
    part $i pos $posx $posy $posz type 1 v $vx $vy $vz q 1 mass 1

setmd time_step 0.02
setmd skin 0.4
set temp 2.493
set gamma 1
thermostat langevin $temp $gamma

set sig 3.0
set eps 1.0
set cut [expr 2.5*$sig]
set shift [expr 0.25*$eps]
inter 0 0 lennard-jones $eps $sig $cut $shift 0
inter 1 0 lennard-jones $eps $sig $cut $shift 0
inter 1 1 lennard-jones $eps $sig $cut $shift 0
inter coulomb 2.3462 p3m tunev2 accuracy 1e-3

set inter_steps 50000
for {set cap 20} {$cap < 200} {incr cap 10} {
    set temp [expr [analyze energy kinetic]/(1.5*[setmd n_part ])]
    puts "t=[setmd time] E=[analyze energy total] T=$temp"
    inter ljforcecap $cap;
    integrate $inter_steps
inter ljforcecap 0

set g [open "" "w"]
set n_part [expr ($n_solute + $n_solvent)]
for {set i 0} { $i < 6000 } {incr i} {
    puts "step $i ftime=[setmd time] energy=[analyze energy total]"
    puts "temp = [expr [analyze energy kinetic]/(1.5*[setmd n_part])]"
    integrate 1000

    set f [open "config_$i" "w"]
    blockfile $f write tclvariable {box_l density}
    blockfile $f write variable box_l
    blockfile $f write particles {id pos type v f q mass}
    blockfile $f write random
    set temp [expr [analyze energy kinetic]/(1.5*[setmd n_part ])]
    puts $f " \ { energy [analyze energy total] $temp}"
    puts $g " [analyze energy kinetic] [analyze pressure total] [analyze energy total] $temp"

    close $f
close $g

This script i am stopping after every 1000 configurations and then running it afterward with the input as the last configuration stored instead of random configuration..

And i am using the configurations both for the calculation of dynamic as well as static properties and hence the reproducibility of the trajectory is important.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]