espressomd-users
[Top][All Lists]
Advanced

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

[ESPResSo-users] <analyze aggregation> command


From: Udit Dewan
Subject: [ESPResSo-users] <analyze aggregation> command
Date: Mon, 16 Sep 2013 10:18:08 +0530

Dear all,

I am a beginner at using MD simulation and have recently started using the ESPResSo software. While simulating a system I tried to use the <analyze aggregation> command. However, it gave me the following message:
check your start and finish molecule id's
    while executing
"analyze aggregation 1.5 0 19"
    ("for" body line 6)
    invoked from within


The id no.s of the particles I want to observe are 0-19 as can be seen from the code below:
set solute 20
set solvent 500

set density 0.01

set volume [expr ($solute+$solvent)/$density]
set box_length [expr pow($volume, 1.0/3.0)]

puts "Simulation box length is $box_length"

set total_particles [expr $solute+$solvent]
set temp 2.54
set t_step 0.0001
set gamma 0.2
set r_cut 1.5
#THE MD PARAMETERS
setmd box_l $box_length $box_length $box_length
setmd time_step $t_step
setmd skin 0.4

#THE THERMOSTAT - TEMPERATURE CONTROL
galilei_transform
thermostat langevin $temp $gamma
#MAKING THE PARTICLES
set id 0
for {set cnt 0} {$cnt < $solute} {incr cnt} {
    set px [expr rand()*$box_length]
    set py [expr rand()*$box_length]
    set pz [expr rand()*$box_length]
    part $id pos $px $py $pz type 0 v 0 0 0
    incr id
}
for {set cnt 0} {$cnt < $solvent} {incr cnt} {
    set px [expr rand()*$box_length]
    set py [expr rand()*$box_length]
    set pz [expr rand()*$box_length]
    part $id pos $px $py $pz type 1 v 0 0 0
    incr id
}
#SETTING UP THE INTERACTIONS
set sigma 1.0
set epsilon 1.0
set cut [expr 1.22426*$sigma]
set shift [expr 0.25*$epsilon]
inter 0 0 lennard-jones $epsilon $sigma $cut $shift 0
inter 1 0 lennard-jones $epsilon $sigma $cut $shift 0
inter 1 1 lennard-jones $epsilon $sigma $cut $shift 0

#EQUILIBRATION
set inter_steps 1000
for {set cap 1} {$cap<200} {incr cap 4} {
    set temp [expr [analyze energy kinetic]/(1.5*[setmd n_part])]
    puts "t=[setmd time] E=[analyze energy total] T=$temp"
    inter forcecap $cap
    integrate $inter_steps
}
inter forcecap 0
#SIMULATION AND WRITING DATA TO FILE
set g [open "analysis2.dat" "w"]
for {set i 0} {$i<1000} {incr i} {
    integrate 300
    set temp [expr [analyze energy kinetic]/(1.5*[setmd n_part ])]
    puts "$i"
    puts $g "Step $i"
    puts $g "[analyze aggregation 1.5 0 19]"
    puts $g " structure factor : [analyze structurefactor 0 2]"
    puts $g " rdf : [analyze rdf 1 0]"
    puts $g " Energy : [analyze energy kinetic] Pressure : [analyze pressure total] Total Energy : [analyze energy total] Temperature : $temp"
}
close $g

Without the analyze aggregation command everything else runs fine. How can I get this command to run?

Regards
Udit Dewan

reply via email to

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