[Top][All Lists]

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

[ESPResSo] Langevin Thermostat

From: Mikheil Azatov
Subject: [ESPResSo] Langevin Thermostat
Date: Mon, 7 Jun 2010 11:27:31 -0400


I'm modeling polymer system in Lnagevin thermostat. To start I reduced my system to just 2 particles in Langevin thermostat. When I'm visualising my results I receive something very weird. The particles just jump from point in the space to another. I tried it with different number of particles with or without interactions between them and the results are always the same( No continuous type of motion , particles just jump from one place to another). As I understand I should receive brownian type of motion instead of these random huge jumps of particles. If anyone had this kind of problem please help me.

Thank you,

My code looks like this:

set name  "test"
set ident "_2"
set vmd_wait  2

setmd box_l 30 30 30

set n_part 2
inter 2 angle 1 [expr [PI]]
inter 1 harmonic 1 1

for {set i 0} { $i < $n_part } {incr i} {
  set posx [expr 0]
  set posy [expr $i*1.5]
  set posz [expr 0]
  part $i pos $posx $posy $posz v 0 0 0


set sig 0.1; set cut   [expr 1.12246*$sig]
set eps 1.0; set shift [expr 0]
inter 0 0 lennard-jones $eps $sig $cut $shift 0

for {set i 1} { $i < $n_part-1 } {incr i} {

         part $i bond 2 [expr $i-1] [expr $i+1]

for {set i 1} { $i < $n_part } {incr i} {
part [expr $i-1] bond 1 $i

setmd time_step 0.00001; setmd skin 0.04
set temp 0.5; set gamma 2
thermostat langevin $temp $gamma

    writepsf "$name$ident.psf"
    writepdb "$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 "vmdoutput.script" "w"]
    puts $vmdout_file "mol load psf $name$ident.psf pdb $name$ident.pdb"
    puts $vmdout_file "rotate stop"
    puts $vmdout_file "imd connect $port"
    puts $vmdout_file "mol modstyle 0 0 CPK 0.5000000 0.100000 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 vmdoutput.script &"
    exec /usr/local/vmd/bin/vmd -e vmdoutput.script &
    imd listen $vmd_wait

set integ_steps 1
for {set i 0} { $i < 50000 } { incr i} {
  set temp [expr [analyze energy kinetic]/((6/2.0)*$n_part)]
  puts "t=[setmd time] E=[analyze energy total], T=$temp"
  integrate $integ_steps
  imd positions

reply via email to

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