espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo] PSAW


From: Mikheil Azatov
Subject: Re: [ESPResSo] PSAW
Date: Thu, 28 Oct 2010 22:20:04 -0400

Hi, I attached the code below. I might have figured out the problem already though. When I use the polymer command without angle feature it seems to work normally but with angle I receive weird results like i explained in previous emails. So, my guess is that RW doesn't work with angle feature in polymer command. Just wanted to check if I'm correct or it's something else.

Thanks
Mikheil Azatov

polymer $npol2 $npart2 8 start 0 mode RW bond 1 constraints  (seems to work )
polymer $npol2 $npart2 8 start 0 mode RW bond 1 angle [expr 0.5*[PI]] constraints  

------------------------
------------------------
The code:



set name  "melt1"
set ident ""
set vmd_wait  10



set box_l 600
setmd box_l $box_l $box_l $box_l
setmd periodic 0 0 0


set ncross 157
set lcross 2
set npart2 100 
set npol2 100
set npol1 0 
set npart1 0

setmd l_cross $lcross
setmd num_part 10000
setmd n_pol $npol1


set kangle 257.5
inter 1 harmonic 50 8
inter 2 angle $kangle [expr [PI]]
inter 3 harmonic 10 3



set bond_id_harmonic 4
inter $bond_id_harmonic harmonic 10 5.5 
setmd bond_id_harmonic $bond_id_harmonic

set bond_id_angle 5
inter $bond_id_angle angle 515 [PI]
setmd bond_id_angle 5

# The ID of this bond must be bond_id_angle +1 !!!!!!!!!!!!!!!
inter 6 angle 515 [expr [PI]/2] 
# Cross-linker's binding properties
setmd bind_distance 0
setmd bind_angle 0.3
setmd f_angle 0.3




constraint wall normal 0 0 -1 dist [expr -($box_l)] type 3
constraint wall normal 0 0 1 dist 0 type 3
constraint wall normal 0 -1 0 dist [expr -($box_l)] type 3
constraint wall normal 0 1 0 dist 0 type 3
constraint wall normal -1 0 0 dist [expr -($box_l)] type 3
constraint wall normal 1 0 0 dist 0 type 3




set seed "[pid]"
set seeds {}
for {set i 0} {$i < [setmd n_nodes]} {incr i} {
   lappend seeds [expr ($i+1)*$seed]
}
eval t_random seed $seeds










polymer $npol2 $npart2 8 start 0 mode RW bond 1 angle [expr 0.5*[PI]] constraints 


for {set i 0 } {$i < [expr $npol2] } {incr i} {
     for {set j 1} { $j < $npart2-1 } {incr j} {
     part [expr $j+$i*$npart2+$npol1*$npart1] bond 2 [expr $j+$i*$npart2+$npol1*$npart1-1] [expr $j+$i*$npart2+$npol1*$npart1+1]
     }
   
     for {set j 0} { $j < $npart2 } {incr j} {
     part [expr $j+$i*$npart2] mass 2.17
     part [expr $j+$i*$npart2] mol [expr $i]
     }
}





polymer $ncross $lcross 3 start [expr $npol2*$npart2] mode SAW 3 bond 3 constraints
for {set i 0} { $i < $ncross } {incr i} {
  part [expr $i*$lcross+$npol2*$npart2] type 1 mass 0.5644
  part [expr $i*$lcross+$npol2*$npart2+1] type 1 mass 0.5644
  part [expr $i*$lcross+$npol2*$npart2] mol [expr $npol2+$i]
  part [expr $i*$lcross+$npol2*$npart2+1] mol [expr $npol2+$i]
}







constraint delete






set sig [expr 8/1.12246]; set cut 9
set eps 0.412; set shift -1 
set sig1 [expr 5.5/1.12246];set cut1 6.5
inter 0 0 lennard-jones $eps $sig $cut $shift 0
inter 0 1 lennard-jones $eps $sig1 $cut1 $shift 0


setmd time_step [expr 0.005*10]; setmd skin 3
set temp 0.412; set gamma [expr 30/10]
thermostat langevin $temp $gamma



    set mdist00 [open "$name$ident/$name$ident-mindist00.out" "w"]
    set mdist01 [open "$name$ident/$name$ident-mindist01.out" "w"]
    set erg [open "$name$ident/$name$ident-energy.out" "w"]
    set str [open "$name$ident/$name$ident-strucfac.out" "w"]
    set cm0 [open "$name$ident/$name$ident-cm0.out" "w"]  
    set cm1 [open "$name$ident/$name$ident-cm1.out" "w"] 

    writepsf "$name$ident/$name$ident.psf"
    writepdb "$name$ident/$name$ident.pdb"
    for {set port 10000} { $port < 65000 } { incr port } {
catch {imd connect $port} res
if {$res == ""} break
    }
    set HOSTNAME [exec hostname]
    set vmdout_file [open "$name$ident-vmdoutput.script" "w"]
    puts $vmdout_file "mol load psf $name$ident/$name$ident.psf pdb $name$ident/$name$ident.pdb"
    puts $vmdout_file "rotate stop"
    puts $vmdout_file "imd connect 127.0.0.1 $port"
    puts $vmdout_file "mol modstyle 0 0 CPK 5.00000 1.00000 8.000000 6.000000"
    puts $vmdout_file "mol modcolor 0 0 SegName"
   
    close $vmdout_file
    puts "PSF and PDB written. IMD connection on port $port"
    puts "Start VMD in the same directory on the machine you like :"
    puts "vmd -e $name$ident-vmdoutput.script &"
    
    exec /usr/local/vmd/bin/vmd -e $name$ident-vmdoutput.script &
    imd listen $vmd_wait






for {set cap 5} {$cap < 50} {  set cap [expr $cap+5] } {

  inter ljforcecap $cap; 
  imd positions 
  for {set i 0} {$i<10} {incr i} {
  set dmin [analyze mindist 0 0]
  puts $mdist00 "$dmin"

 set dmin [analyze mindist 0 1]
 puts $mdist01 "$dmin"

  inter 2 angle [expr $kangle*$cap/100] [expr [PI]]
  puts "t=[setmd time] E=[analyze energy kinetic]"
  integrate 1  

  } 
 imd positions -unfolded;
}

inter ljforcecap 0

integrate 10000

setmd bind_distance 7

puts  [setmd verlet_reuse]
puts [setmd cell_grid]


set energystep 1
set cmstep 5
set vmdstep 1
set pdbstep 20
set pdbindex 0
set integ_steps 2000
set E 0 

for {set i 0} { $i < 1 } { incr i} {
  integrate $integ_steps
  imd positions -unfolded;
     writepsf "$name$ident/$name$ident$i.psf"
     writepdb "$name$ident/$name$ident$i.pdb" 


  puts " i = $i "
  puts  [setmd verlet_reuse]

  if {[expr $i%$pdbstep] == 0 } {
     incr pdbindex
     writepsf "$name$ident/$name$ident$pdbindex.psf"
     writepdb "$name$ident/$name$ident$pdbindex.pdb" 
     set f [open "$name$ident/config_$pdbindex" "w"]
     blockfile $f write variable box_l
     blockfile $f write particles {id pos type}
     close $f
     
    puts "a"
  }

  if {[expr $i%$cmstep] == 0} {
     set CM [analyze centermass 0]
     puts $cm0 $CM
     set CM [analyze centermass 1]
     puts $cm1 $CM
     }
}
puts "b"
set final "final"
writepsf "$name$ident/$name$ident$final.psf"
writepdb "$name$ident/$name$ident$final.pdb"

On Wed, Oct 27, 2010 at 4:43 AM, Axel Arnold <address@hidden> wrote:
On Tuesday 26 October 2010 21:20:50 Mikheil Azatov wrote:
> Hi!
>
> Yes I was talking about he polymer command.  The differences probably
> appear only in the equilibration part. I mean in the beginning of the
> simulation I had the maximum distances between particles in the polymer
> larger then when using SAW. The User Guide says just that statistics for
> PSAW is different then a statistics for SAW but it doesn't say in what way
> are they
> different.

If a monomer of the PSAW cannot be placed, this monomer will be simply put to
another position, while the SAW discards the whole polymer and starts again.
Therefore, PSAW is much faster, but the statistics is slightly biased, since a
blocked move increases the probability for the possible moves around. At low
concentrations, the effect is low and can probably be healed by equilibration,
but at high densities, the entanglement won't have SAW statistics, although I
don't know which statistics it will have.

> I also wanted to ask if constraints are walking for RW polymers. I usually
> create polymers with constraint command because i want them to be in a
> certain volume. After I create polymers I delete constraints. When I use
> PSAW and SAW commands for polymers everything works fine and the polymers
> are being created within that volume. For RW it doesn't work that way. The
> polymers are kind of "reflected" from the borders of constraints and can
> have other ends on the other side of the simulation box. I think sometime
> they even "merge" with each other( particles with different ID's that
> belong to different polymers are actually same particles). I don't use PBC
> and the output to vmd are unfolded coordinates, so i don't think it's
> connected to it. So i was wondering if constraints are actually working
> with RW and I'm just doing something wrong or they just don't work with RW
> polymers?

No idea, there is only one code for generating a polymer (polymer.c:polymerC)
which is used for SAW, PSAW and RW. Therefore, if the first two work with
constraints, also the last should. If you can send us a script that reproduces
your problem, we can take a look.

Axel

--
JP Dr. Axel Arnold Tel: +49 711 685 67609
ICP, Universität Stuttgart      Email: address@hidden
Pfaffenwaldring 27
70569 Stuttgart, Germany


_______________________________________________
ESPResSo mailing list
address@hidden
https://fias.uni-frankfurt.de/mailman/listinfo/espresso


reply via email to

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