espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo] Self-avoiding random walk SAW


From: Mikheil Azatov
Subject: Re: [ESPResSo] Self-avoiding random walk SAW
Date: Fri, 30 Jul 2010 13:18:14 -0400

Hi,

Here is a sample of the code.


In the beginning there are some variables that I use,  so just skip that part because I removed parts of the code and some of the variables are not even used ( and some setmd commands are the ones that i added myself). I just wanted to send still compiling version. But basically I put 50 polymers each having 10 monomers with parameter SAW set to 8. Then I calculate mindist and it's around 2.

set name  "present"
set ident ""
set vmd_wait  10


setmd box_l 500 500 500
setmd periodic 1 1 1


set ncross 0
set lcross 2
set npart 10
set npol 50


setmd l_cross 2
setmd num_part 10
setmd n_pol 50


inter 1 harmonic 10 8
inter 2 angle 257.5 [expr [PI]]
inter 3 harmonic 10 8



# I cannot use bond_id_harmonic here so if I change interaction ID I need to change bond_id_harmonic too!!!
inter 4 harmonic 10 5.5
# Same here!
inter 5 angle 515 [PI]
# The ID of this bond must be bond_id_angle +1 !!!!!!!!!!!!!!!
inter 6 angle 515 [expr [PI]/2]
# Cross-linker's binding properties
setmd bond_id_harmonic 4
setmd bond_id_angle 5
setmd bind_distance 7
setmd bind_angle 0.3
setmd f_angle 0.3



# Here I start putting polymers in the system!!!

t_random seed [pid]

for {set i 0 } {$i < $npol} {incr i} {
puts "i=$i"
polymer 1 $npart 8 start [expr $i*$npart] pos [expr 100*[t_random]+200] [expr 100*[t_random]+200] [expr 100*[t_random]+200] mode SAW 8 bond 1 angle [expr 0.9*[PI]]

}



for {set i 0 } {$i < $npol} {incr i} {
     for {set j 1} { $j < $npart-1 } {incr j} {
     part [expr $j+$i*$npart] bond 2 [expr $j+$i*$npart-1] [expr $j+$i*$npart+1]
     }
  
     for {set j 0} { $j < $npart } {incr j} {
     part [expr $j+$i*$npart] mass 2.17
     }
}







set sig [expr 8/1.12246]; set cut 9
set eps 0.412; set shift -1

inter 0 0 lennard-jones $eps $sig $cut $shift 0



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



set min [analyze mindist 0 0 ]
puts "$min"


    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




inter ljforcecap 0

set integ_steps 1


for {set i 0} { $i < 50 } { incr i} {
  integrate $integ_steps
  imd positions;
  }



Thanks, Mke


On Fri, Jul 30, 2010 at 12:10 PM, Axel Arnold <address@hidden> wrote:
On Thursday 29 July 2010 20:54:32 Mikheil Azatov wrote:
> Hi Espresso users,
>
> I wanted to ask question about self-avoiding random walk. Does anyone know
> how does it actually work in polymers? After I create all the polymers the
> minimum distance(calculated with analyze mindist) between monomers is
> always less then shield value in SAW option.  I know for sure that if I
> increase number of polymers it fails to put all of them in the simulation
> box so the algorithm has to check the distances with all other particles,
> but how does it check them if the minimum distance becomes less then shield
> ?

Can you post your script? Otherwise, it is difficult to say what happens. For
me, the SAW always produces a mindist between the bond length and the shield
value, as it should.

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]