espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo-users] <analyze aggregation> command


From: Udit Dewan
Subject: Re: [ESPResSo-users] <analyze aggregation> command
Date: Wed, 18 Sep 2013 16:50:17 +0530

Thank you for the prompt reply.

I tried to initialize the system with molecules by changing the command for the solute particles to:
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
    analyze set $id $id
    analyze set topo_part_sync
    puts "[analyze set]"
    incr id
}

However, this still gives me the same error.

Regards
Udit


On Mon, Sep 16, 2013 at 3:59 PM, Florian Weik <address@hidden> wrote:
Hello,
analyze aggregation takes molecule ids as parameters, not particle ids. These are different, you can group multiple particles into one molecule.
At the moment you have do define molecules to use the command, even if those molecules only contain single particles. Please have a look
at section 8.2 of the espresso user guide to learn how to create molecules.

Best,
Florian


On Mon, Sep 16, 2013 at 6:48 AM, Udit Dewan <address@hidden> wrote:
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



--
Florian Weik

address@hidden
++49 157 85939252



reply via email to

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