mbtools_tutorial/ 0000755 0001750 0001750 00000000000 12603613250 014332 5 ustar patrick patrick mbtools_tutorial/buckle/ 0000755 0001750 0001750 00000000000 12413063203 015573 5 ustar patrick patrick mbtools_tutorial/buckle/measure_stress/ 0000755 0001750 0001750 00000000000 12413072525 020646 5 ustar patrick patrick mbtools_tutorial/buckle/measure_stress/measure_stress.tcl 0000644 0001750 0001750 00000014733 12413072525 024426 0 ustar patrick patrick # Copyright (C) 2010 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Max-Planck-Institute for Polymer Research, Theory Group, PO Box 3148, 55021 Mainz, Germany
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#-----------------------------------------------------------#
#
# Simple example script for running a membrane simulation
#
# Implements settings contained in a parameter file which should be
# given as an argument.
#
# -----------------------------------------------------------#
# Get the name of the current namespace
set this [namespace current]
# --- ensure required packages are available ---------------#
set result [package require ::mmsg]
::mmsg::send $this "loaded version [package require ::mbtools::analysis] of analysis"
::mmsg::send $this "loaded version [package require cmdline] of cmdline"
::mmsg::send $this "loaded version [package require ::mbtools::system_generation] of system_generation"
# Capture the child namespaces of analysis and system_generation so
# that we can explicitly allow messages from these.
set message_allowlist { :: ::mbtools::utils ::mbtools::system_generation ::mbtools::analysis }
set children [namespace children ::mbtools::analysis]
foreach child $children {
lappend message_allowlist $child
}
set children [namespace children ::mbtools::system_generation]
foreach child $children {
lappend message_allowlist $child
}
# Set the namespaces from which messages will be printed
catch { ::mmsg::setnamespaces $message_allowlist }
# ---- Process Command Line Args --------------------------- #
# Note that this can cause problems reading checkpoints. The usage
# below seems to work ok.
set options {
{n.arg 1 set the number of processors }
}
set usage "Usage: main.tcl n: paramsfile"
array set params [::cmdline::getoptions argv $options $usage]
set paramsfile [lindex $argv 0]
# Enable debugging messages
#::mmsg::enable debug
#----------- System Parameters ----------------------------#
# Set a bunch of default parameters.
set thermo Langevin
set warmup_temp 0
set warmsteps 100
set warmtimes 20
set free_warmsteps 0
set free_warmtimes 0
set startj 0
set startk 0
set startmdtime 0
set npt off
set mgrid 8
set stray_cut_off 1000.0
set use_vmd "offline"
set tablenames ""
set trappedmols ""
::mmsg::send $this "using paramsfile: $paramsfile"
source $paramsfile
#----------- Default Parameters set from System Params ----#
if { $warmup_temp == 0 } {
set warmup_temp [lindex $systemtemp 0 ]
}
# ----------- Initialization ------------------ -----------#
set lable "t6"
set outputdir "./$lable"
set chkptfile "$outputdir/checkpoint.$lable.gz"
set in [open "|gzip -cd $chkptfile" "r"]
while { [blockfile $in read auto] != "eof" } {}
close $in
set outputdir "./$lable"
::mbtools::utils::read_topology "$outputdir/$topofile"
::mbtools::utils::initialize_vmd $use_vmd $outputdir $ident
set startj 0
set startk 0
setmd time 0
#Main Integration #
#----------------------------------------------------------#
set j $startj
thermostat langevin $systemtemp $langevin_gamma
::mbtools::analysis::setup_analysis $analysis_flags -outputdir $outputdir -g $mgrid -str $stray_cut_off
set int_n_times 100000
set write_frequency 100
set timingstart [clock clicks -milliseconds]
for {set k $startk } { $k < $int_n_times } { incr k} {
mmsg::send $this "run $k at time=[setmd time]"
# Call all of the analyze routines that we specified when setting
# up our analysis
::mbtools::analysis::do_analysis
# If k is a multiple of analysis_write_frequency then write the
# analysis results to file
if { $k%$analysis_write_frequency ==0 } {
::mbtools::analysis::print_averages
}
# If k is a multiple of write_frequency then write out a full
# particle configuration
if { $k%$write_frequency==0 } {
#polyBlockWrite "$outputdir/$ident.[format %04d $j].gz" {time box_l npt_p_diff } {id pos type v f molecule}
set out [open "|gzip -c - > $outputdir/$ident.[format %04d $j].gz" "w"]
blockfile $out write start "variable"
puts $out "time [setmd time]"
blockfile $out write end
blockfile $out write start "variable"
puts $out "box_l $box_l"
blockfile $out write end
blockfile $out write start "variable"
puts $out "npt_p_diff [setmd npt_p_diff]"
blockfile $out write end
blockfile $out write interactions
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
close $out
mmsg::send $this "wrote file $outputdir/$ident.[format %04d $j].gz "
flush stdout
if { $use_vmd == "offline" } {
writepdbfoldtopo "$outputdir/$ident.vmd[format %04d $j].pdb"
}
incr j
}
# Do the real work of integrating equations of motion
integrate $int_steps
set timingcurr [clock clicks -milliseconds]
set elapsedtime [expr $timingcurr - $timingstart]
::mmsg::send $this "elapsed time: $elapsedtime"
# Write a checkpoint to allow restarting. Overwrites previous
# checkpoint
mmsg::send $this "setting checkpoint $k [setmd time] $j"
#checkpoint_set "$outputdir/checkpoint.latest.gz"
set out [open "|gzip -c - > $outputdir/checkpoint.latest.gz" "w"]
blockfile $out write variable all
blockfile $out write tclvariable all
blockfile $out write interactions
blockfile $out write random
blockfile $out write bitrandom
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
blockfile $out write configs
close $out
# Try to copy a checkpoint to the backup checkpoint folder.
# Usefull if the program crashes while writing a checkpoint
if { [ catch { exec cp "$outputdir/checkpoint.latest.gz" "$outputdir/checkpoint_bak/checkpoint.latest.gz" } ] } {
mmsg::warn $this "warning: couldn't copy backup checkpoint"
}
}
# terminate program
mmsg::send $this "\n\nfinished"
exit 1
mbtools_tutorial/buckle/measure_stress/simplebilayer.tcl 0000644 0001750 0001750 00000012427 12413072525 024221 0 ustar patrick patrick # Copyright (C) 2010 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Max-Planck-Institute for Polymer Research, Theory Group, PO Box 3148, 55021 Mainz, Germany
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#
# Parameter file for simulating a one component flat lipid bilayer
# at fixed box size and temperature.
#
#
# To run this file use $ESPRESSO_SOURCE/$PLATFORM/Espresso ./scripts/main.tcl simplebilayer.tcl
#
# For more information about the simulation model on which this
# simulation is based see the following reference
#
# Cooke, I. R., Kremer, K. and Deserno, M.(2005): Tuneable, generic
# model for fluid bilayer membranes. Phys. Rev. E. 72 - 011506
#
::mmsg::send [namespace current] "loading parameter file .. " nonewline
flush stdout
# Specify the name of the job the location of forcetables and
# the output and scripts directories
set ident "NPxT_50_8_15"
set tabledir "./forcetables/"
set outputdir "./$ident/"
set topofile "$ident.top"
# Specify how we want to use vmd for visualization: allowable values
# are "interactive" "offline" "none". interactive rarely works
set use_vmd "offline"
# --- Specify a global key for molecule types -----#
# In this line we specify the details of all molecule types in the
# system. In this example molecule type 0 is assigned to be a lipid.
# The atom types in this lipid are 0 1 and 2 respectively and the
# bonding interactions are type 0 for short bonds and type 1 for long
# bonds.
set moltypes [list { 0 lipid { 0 1 2 } { 0 1 } } ]
# --- Specify the system geometry and composition ----#
# Set the geometry to flat
set geometry { geometry "flat -fixz" }
# Set the box size
set box_l 50.0
set setbox_l { 50.0 8.0 15.0 }
set area [expr [lindex $setbox_l 0]*[lindex $setbox_l 1]]
set nlipid [expr $area*2/1.25]
set n_molslist [subst { n_molslist { { 0 $nlipid } } }]
# Now bundle the above info into a list
lappend bilayerspec $geometry
lappend bilayerspec $n_molslist
# Now group the bilayerspec with other specs into a list of such
# systems (we can have multiple systems if we like each with different
# composition of molecule types
lappend system_specs $bilayerspec
# Warmup parameters
#----------------------------------------------------------#
set warm_time_step 0.002
set free_warmsteps 100
set free_warmtimes 50
# ---- NPT parameters --------- #
set npt on
set p_ext 0.000
set piston_mass 0.5
set gamma_0 1.0
set gamma_v 0.0001
# ------ Integration parameters -----------------#
set main_time_step 0.002
set verlet_skin 0.4
set langevin_gamma 1.0
set systemtemp 1.1
# The number of steps to integrate with each call to integrate
set int_steps 500
# The number of times to call integrate
set int_n_times 10000
# Write a configuration file every calls to
# integrate
set write_frequency 100
# Write results to analysis files every
# calls to integrate
set analysis_write_frequency 1
# Bonded and bending Potentials
#----------------------------------------------------------#
lappend bonded_parms [list 0 FENE 30 1.5 ]
lappend bonded_parms [list 1 harmonic 10.0 4.0 ]
# Non Bonded Potentials
#----------------------------------------------------------#
# Define the interactions between lipid heads and tails
# Useful Parameters
set lj_eps 1.0
set lj_cutoff 2.5
set ljshift 0.0
set ljoffset 0.0
set lj_sigmah 0.95
set lj_sigma 1.0
# Define the interaction matrix
lappend nb_interactions [list 0 0 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 1 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 2 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
# We use a special type of cosine attractive potential for the tail tail interactions.
lappend nb_interactions [list 1 1 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 1 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 2 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
# Analysis Parameters
#----------------------------------------------------------#
# These are are parameters that will be passed to the setup_analysis
# command when it is called in the main.tcl script.
set mgrid 8
set stray_cut_off 3
# Use these flags to specify which observables to calculate during the
# simulation. Values are calculated after every call to the espresso
# integrate command and written to files like
# time_vs_parametername. See the analysis package for more
# details
lappend analysis_flags stress_tensor
lappend analysis_flags boxl
lappend analysis_flags energy
::mmsg::send [namespace current] "done"
mbtools_tutorial/buckle/create_buckle/ 0000755 0001750 0001750 00000000000 12413070450 020365 5 ustar patrick patrick mbtools_tutorial/buckle/create_buckle/simplebilayer.tcl 0000644 0001750 0001750 00000012423 12413070450 023734 0 ustar patrick patrick # Copyright (C) 2010 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Max-Planck-Institute for Polymer Research, Theory Group, PO Box 3148, 55021 Mainz, Germany
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#
# Parameter file for simulating a one component flat lipid bilayer
# at fixed box size and temperature.
#
#
# To run this file use $ESPRESSO_SOURCE/$PLATFORM/Espresso ./scripts/main.tcl simplebilayer.tcl
#
# For more information about the simulation model on which this
# simulation is based see the following reference
#
# Cooke, I. R., Kremer, K. and Deserno, M.(2005): Tuneable, generic
# model for fluid bilayer membranes. Phys. Rev. E. 72 - 011506
#
::mmsg::send [namespace current] "loading parameter file .. " nonewline
flush stdout
# Specify the name of the job the location of forcetables and
# the output and scripts directories
set ident "NPxT_45_8_15"
set tabledir "./forcetables/"
set outputdir "./$ident/"
set topofile "$ident.top"
# Specify how we want to use vmd for visualization: allowable values
# are "interactive" "offline" "none". interactive rarely works
set use_vmd "offline"
# --- Specify a global key for molecule types -----#
# In this line we specify the details of all molecule types in the
# system. In this example molecule type 0 is assigned to be a lipid.
# The atom types in this lipid are 0 1 and 2 respectively and the
# bonding interactions are type 0 for short bonds and type 1 for long
# bonds.
set moltypes [list { 0 lipid { 0 1 2 } { 0 1 } } ]
# --- Specify the system geometry and composition ----#
# Set the geometry to flat
set geometry { geometry "flat -fixz" }
# Set the box size
set box_l 45.0
set setbox_l { 45.0 8.0 15.0 }
set area [expr [lindex $setbox_l 0]*[lindex $setbox_l 1]]
set nlipid [expr $area*2/1.25]
set n_molslist [subst { n_molslist { { 0 $nlipid } } }]
# Now bundle the above info into a list
lappend bilayerspec $geometry
lappend bilayerspec $n_molslist
# Now group the bilayerspec with other specs into a list of such
# systems (we can have multiple systems if we like each with different
# composition of molecule types
lappend system_specs $bilayerspec
# Warmup parameters
#----------------------------------------------------------#
set warm_time_step 0.002
set free_warmsteps 100
set free_warmtimes 50
# ---- NPT parameters --------- #
set npt on
set p_ext 0.000
set piston_mass 0.5
set gamma_0 1.0
set gamma_v 0.0001
# ------ Integration parameters -----------------#
set main_time_step 0.002
set verlet_skin 0.4
set langevin_gamma 1.0
set systemtemp 1.1
# The number of steps to integrate with each call to integrate
set int_steps 500
# The number of times to call integrate
set int_n_times 200
# Write a configuration file every calls to
# integrate
set write_frequency 1
# Write results to analysis files every
# calls to integrate
set analysis_write_frequency 1
# Bonded and bending Potentials
#----------------------------------------------------------#
lappend bonded_parms [list 0 FENE 30 1.5 ]
lappend bonded_parms [list 1 harmonic 10.0 4.0 ]
# Non Bonded Potentials
#----------------------------------------------------------#
# Define the interactions between lipid heads and tails
# Useful Parameters
set lj_eps 1.0
set lj_cutoff 2.5
set ljshift 0.0
set ljoffset 0.0
set lj_sigmah 0.95
set lj_sigma 1.0
# Define the interaction matrix
lappend nb_interactions [list 0 0 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 1 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 2 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
# We use a special type of cosine attractive potential for the tail tail interactions.
lappend nb_interactions [list 1 1 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 1 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 2 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
# Analysis Parameters
#----------------------------------------------------------#
# These are are parameters that will be passed to the setup_analysis
# command when it is called in the main.tcl script.
set mgrid 8
set stray_cut_off 3
# Use these flags to specify which observables to calculate during the
# simulation. Values are calculated after every call to the espresso
# integrate command and written to files like
# time_vs_parametername. See the analysis package for more
# details
lappend analysis_flags stress_tensor
lappend analysis_flags boxl
lappend analysis_flags energy
::mmsg::send [namespace current] "done"
mbtools_tutorial/buckle/create_buckle/squeeze.tcl 0000644 0001750 0001750 00000030612 12413070450 022554 0 ustar patrick patrick # Copyright (C) 2010,2012,2013,2014 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#-----------------------------------------------------------#
#
# Simple example script for running a membrane simulation
#
# Implements settings contained in a parameter file which should be
# given as an argument.
#
# -----------------------------------------------------------#
# Get the name of the current namespace
set this [namespace current]
# --- ensure required packages are available ---------------#
set result [package require ::mmsg]
::mmsg::send $this "loaded version [package require ::mbtools::analysis] of analysis"
::mmsg::send $this "loaded version [package require cmdline] of cmdline"
::mmsg::send $this "loaded version [package require ::mbtools::system_generation] of system_generation"
# Capture the child namespaces of analysis and system_generation so
# that we can explicitly allow messages from these.
set message_allowlist { :: ::mbtools::utils ::mbtools::system_generation ::mbtools::analysis }
set children [namespace children ::mbtools::analysis]
foreach child $children {
lappend message_allowlist $child
}
set children [namespace children ::mbtools::system_generation]
foreach child $children {
lappend message_allowlist $child
}
# Set the namespaces from which messages will be printed
catch { ::mmsg::setnamespaces $message_allowlist }
# ---- Process Command Line Args --------------------------- #
# Note that this can cause problems reading checkpoints. The usage
# below seems to work ok.
set options {
{n.arg 1 set the number of processors }
}
set usage "Usage: main.tcl n: paramsfile"
array set params [::cmdline::getoptions argv $options $usage]
set paramsfile [lindex $argv 0]
#Initialise Random Number Generator
#----------------------------------------------------------#
::mbtools::utils::init_random $params(n)
# Enable debugging messages
#::mmsg::enable debug
#----------- System Parameters ----------------------------#
# Set a bunch of default parameters.
set thermo Langevin
set warmup_temp 0
set warmsteps 100
set warmtimes 20
set free_warmsteps 0
set free_warmtimes 0
set startj 0
set startk 0
set startmdtime 0
set npt off
set mgrid 8
set stray_cut_off 1000.0
set use_vmd "offline"
set tablenames ""
set trappedmols ""
::mmsg::send $this "using paramsfile: $paramsfile"
source $paramsfile
#----------- Default Parameters set from System Params ----#
if { $warmup_temp == 0 } {
set warmup_temp [lindex $systemtemp 0 ]
}
# ----------- Initialization ------------------ -----------#
# Attempt to read a checkpoint file
set checkpointexists [ ::mbtools::utils::readcheckpoint $outputdir ]
# Set the starting time for this run ie override the value in checkpoint file
set starttime [clock seconds]
if { !$checkpointexists } {
# No checkpoint exists so we need to setup everything from scratch
# Setup the output directory by creating it and copying
# forcetables to it
::mbtools::utils::setup_outputdir $outputdir -paramsfile $paramsfile -tabdir $tabledir -tabnames $tablenames
# Set the box dimensions
setmd box_l [lindex $setbox_l 0] [lindex $setbox_l 1] [lindex $setbox_l 2]
# Specify the bonded interactions
::mbtools::utils::set_bonded_interactions $bonded_parms
# Specifiy the non-bonded tabulated interactions .. actually this
# routine is only kept for backwards compatibility other_nb should
# be used instead
# ::setup_utilities::set_tab_interactions $tablenames $tabledir $outputdir
# Specify any other non-bonded interactions
if { [ catch { ::mbtools::utils::set_nb_interactions $nb_interactions } ] } {
mmsg::send $this "no non-bonded interactions used"
}
set topology [::mbtools::system_generation::setup_system $system_specs $setbox_l $moltypes]
# Set the generated topology into the internals of espresso.
::mbtools::utils::set_topology $topology
set trappedmols [::mbtools::system_generation::get_trappedmols]
# Fix molecules if necessary
if { $trappedmols != -1 } {
::mbtools::utils::trap_mols $trappedmols
}
#Initialise Random Number Generator
#----------------------------------------------------------#
::mbtools::utils::init_random $params(n)
# ----------- Integration Parameters before warmup -----------#
setmd time_step $warm_time_step
setmd skin $verlet_skin
thermostat langevin $warmup_temp $langevin_gamma
# Set the topology and molecule information
#----------------------------------------------------------#
#write topology file
set f_topo [open "$outputdir/$ident.top" w]
blockfile_write_topology $f_topo write topology
close $f_topo
# Check if there are any extra vmdcommands and if not initialize a default
if { [catch { set dummy $vmdcommands } ] } {
set vmdcommands ""
}
::mbtools::utils::initialize_vmd $use_vmd $outputdir $ident -extracommands $vmdcommands
#Perform the warm up integration
#----------------------------------------------------------#
mmsg::send $this "warming up at [setmd temp]"
::mbtools::utils::warmup $warmsteps $warmtimes -cfgs 10 -outputdir $outputdir
# Bilayer systems may have been setup with fixed z positions for
# particles. Here we make sure that all particles are unfixed
# after warmup
set userfixedparts [::mbtools::system_generation::get_userfixedparts ]
for {set i 0} { $i < [setmd n_part] } {incr i} {
if { [lsearch $userfixedparts $i ] == -1 } {
part [expr $i] fix 0 0 0
}
}
setmd time_step $main_time_step
thermostat langevin [lindex $systemtemp 0] $langevin_gamma
::mmsg::send $this "warming up again at [setmd temp]"
::mbtools::utils::warmup $free_warmsteps $free_warmtimes -startcap 1000 -outputdir $outputdir -cfgs 10 -capgoal 5000
# ----------- Integration Parameters after warmup -----------#
setmd time_step $main_time_step
thermostat langevin [lindex $systemtemp 0] $langevin_gamma
mmsg::send $this "starting integration: run $int_n_times times $int_steps steps"
# Reset the time to a starttime (usually zero) after warmup
setmd time $startmdtime
} else {
# A checkpoint exists so all we need to do is reset the topology and setup analysis again
::mbtools::utils::read_topology "$outputdir/$topofile"
::mbtools::utils::initialize_vmd $use_vmd $outputdir $ident
# Yikes I hope this is right. We want to make sure that we start
# exactly from where the checkpoint was written
set startj $j
set startk [expr $k + 1]
}
#Main Integration #
#----------------------------------------------------------#
set int_n_times 200
set j $startj
::mbtools::analysis::setup_analysis $analysis_flags -outputdir $outputdir -g $mgrid -str $stray_cut_off
thermostat langevin $systemtemp $langevin_gamma
integrate set nvt
mmsg::send $this "nvt integrator has been set"
flush stdout
set boxl [setmd box_l]
set boxlxz [expr [lindex $boxl 0]*[lindex $boxl 2]]
set dx [expr 0.015*[lindex $boxl 0]]
set write_frequency 50
for {set i 0} {$i < 40} {incr i} {
set boxl [setmd box_l]
# Set the box dimensions
set boxlx [expr [lindex $boxl 0]-$dx]
set boxlz [expr $boxlxz/$boxlx]
setmd box_l $boxlx [lindex $setbox_l 1] $boxlz
mmsg::send $this "box size: [setmd box_l]"
# ----------- Integration Parameters before warmup -----------#
setmd time_step $warm_time_step
setmd skin $verlet_skin
thermostat langevin $warmup_temp $langevin_gamma
#Perform the warm up integration
#----------------------------------------------------------#
mmsg::send $this "warming up at [setmd temp]"
::mbtools::utils::warmup $warmsteps $warmtimes -cfgs 10 -outputdir $outputdir
setmd time_step $main_time_step
thermostat langevin [lindex $systemtemp 0] $langevin_gamma
::mmsg::send $this "warming up again at [setmd temp]"
::mbtools::utils::warmup $free_warmsteps $free_warmtimes -startcap 1000 -outputdir $outputdir -cfgs 10 -capgoal 5000
# ----------- Integration Parameters after warmup -----------#
setmd time_step $main_time_step
thermostat langevin [lindex $systemtemp 0] $langevin_gamma
mmsg::send $this "starting integration: run $int_n_times times $int_steps steps"
set timingstart [clock clicks -milliseconds]
for {set k $startk } { $k < $int_n_times } { incr k} {
mmsg::send $this "run $k at time=[setmd time]"
# Call all of the analyze routines that we specified when setting
# up our analysis
::mbtools::analysis::do_analysis
# If k is a multiple of analysis_write_frequency then write the
# analysis results to file
if { $k%$analysis_write_frequency ==0 } {
::mbtools::analysis::print_averages
}
# If k is a multiple of write_frequency then write out a full
# particle configuration
if { $k%$write_frequency==0 } {
#polyBlockWrite "$outputdir/$ident.[format %04d $j].gz" {time box_l npt_p_diff } {id pos type v f molecule}
set out [open "|gzip -c - > $outputdir/$ident.[format %04d $j].gz" "w"]
blockfile $out write start "variable"
puts $out "time [setmd time]"
blockfile $out write end
blockfile $out write start "variable"
puts $out "box_l $box_l"
blockfile $out write end
blockfile $out write start "variable"
puts $out "npt_p_diff [setmd npt_p_diff]"
blockfile $out write end
blockfile $out write interactions
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
close $out
mmsg::send $this "wrote file $outputdir/$ident.[format %04d $j].gz "
flush stdout
if { $use_vmd == "offline" } {
writepdbfoldtopo "$outputdir/$ident.vmd[format %04d $j].pdb"
}
incr j
}
# Do the real work of integrating equations of motion
integrate $int_steps
set timingcurr [clock clicks -milliseconds]
set elapsedtime [expr $timingcurr - $timingstart]
::mmsg::send $this "elapsed time: $elapsedtime"
if { $k%$write_frequency==0 } {
# Write a checkpoint to allow restarting. Overwrites previous
# checkpoint
mmsg::send $this "setting checkpoint $k [setmd time] $j"
#checkpoint_set "$outputdir/checkpoint.t[format %d [::tcl::mathfunc::round [setmd time]]].gz"
set out [open "|gzip -c - > $outputdir/checkpoint.t[format %d $j].gz" "w"]
blockfile $out write variable all
blockfile $out write tclvariable all
blockfile $out write interactions
blockfile $out write random
blockfile $out write bitrandom
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
blockfile $out write configs
close $out
}
# Write a checkpoint to allow restarting. Overwrites previous
# checkpoint
mmsg::send $this "setting checkpoint $k [setmd time] $j"
#checkpoint_set "$outputdir/checkpoint.latest.gz"
set out [open "|gzip -c - > $outputdir/checkpoint.latest.gz" "w"]
blockfile $out write variable all
blockfile $out write tclvariable all
blockfile $out write interactions
blockfile $out write random
blockfile $out write bitrandom
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
blockfile $out write configs
close $out
# Try to copy a checkpoint to the backup checkpoint folder.
# Usefull if the program crashes while writing a checkpoint
if { [ catch { exec cp "$outputdir/checkpoint.latest.gz" "$outputdir/checkpoint_bak/checkpoint.latest.gz" } ] } {
mmsg::warn $this "warning: couldn't copy backup checkpoint"
}
}
set k 0
}
# terminate program
mmsg::send $this "\n\nfinished"
exit 1
mbtools_tutorial/buckle/zero_stress/ 0000755 0001750 0001750 00000000000 12413063427 020165 5 ustar patrick patrick mbtools_tutorial/buckle/zero_stress/main.tcl 0000644 0001750 0001750 00000024735 12413063427 021630 0 ustar patrick patrick # Copyright (C) 2010 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group, PO Box 3148, 55021 Mainz, Germany
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#-----------------------------------------------------------#
#
# Simple example script for running a membrane simulation
#
# Implements settings contained in a parameter file which should be
# given as an argument.
#
# -----------------------------------------------------------#
# Get the name of the current namespace
set this [namespace current]
# --- ensure required packages are available ---------------#
set result [package require ::mmsg]
::mmsg::send $this "loaded version [package require ::mbtools::analysis] of analysis"
::mmsg::send $this "loaded version [package require cmdline] of cmdline"
::mmsg::send $this "loaded version [package require ::mbtools::system_generation] of system_generation"
# Capture the child namespaces of analysis and system_generation so
# that we can explicitly allow messages from these.
set message_allowlist { :: ::mbtools::utils ::mbtools::system_generation ::mbtools::analysis }
set children [namespace children ::mbtools::analysis]
foreach child $children {
lappend message_allowlist $child
}
set children [namespace children ::mbtools::system_generation]
foreach child $children {
lappend message_allowlist $child
}
# Set the namespaces from which messages will be printed
catch { ::mmsg::setnamespaces $message_allowlist }
# ---- Process Command Line Args --------------------------- #
# Note that this can cause problems reading checkpoints. The usage
# below seems to work ok.
set options {
{n.arg 1 set the number of processors }
}
set usage "Usage: main.tcl n: paramsfile"
array set params [::cmdline::getoptions argv $options $usage]
set paramsfile [lindex $argv 0]
# Enable debugging messages
#::mmsg::enable debug
#----------- System Parameters ----------------------------#
# Set a bunch of default parameters.
set thermo Langevin
set warmup_temp 0
set warmsteps 100
set warmtimes 20
set free_warmsteps 0
set free_warmtimes 0
set startj 0
set startk 0
set startmdtime 0
set npt off
set mgrid 8
set stray_cut_off 1000.0
set use_vmd "offline"
set tablenames ""
set trappedmols ""
::mmsg::send $this "using paramsfile: $paramsfile"
source $paramsfile
#----------- Default Parameters set from System Params ----#
if { $warmup_temp == 0 } {
set warmup_temp [lindex $systemtemp 0 ]
}
# ----------- Initialization ------------------ -----------#
# Attempt to read a checkpoint file
set checkpointexists [ ::mbtools::utils::readcheckpoint $outputdir ]
# Set the starting time for this run ie override the value in checkpoint file
set starttime [clock seconds]
if { !$checkpointexists } {
# No checkpoint exists so we need to setup everything from scratch
# Setup the output directory by creating it and copying
# forcetables to it
::mbtools::utils::setup_outputdir $outputdir -paramsfile $paramsfile -tabdir $tabledir -tabnames $tablenames
# Set the box dimensions
setmd box_l [lindex $setbox_l 0] [lindex $setbox_l 1] [lindex $setbox_l 2]
# Specify the bonded interactions
::mbtools::utils::set_bonded_interactions $bonded_parms
# Specifiy the non-bonded tabulated interactions .. actually this
# routine is only kept for backwards compatibility other_nb should
# be used instead
# ::setup_utilities::set_tab_interactions $tablenames $tabledir $outputdir
# Specify any other non-bonded interactions
if { [ catch { ::mbtools::utils::set_nb_interactions $nb_interactions } ] } {
mmsg::send $this "no non-bonded interactions used"
}
set topology [::mbtools::system_generation::setup_system $system_specs $setbox_l $moltypes]
# Set the generated topology into the internals of espresso.
::mbtools::utils::set_topology $topology
set trappedmols [::mbtools::system_generation::get_trappedmols]
# Fix molecules if necessary
if { $trappedmols != -1 } {
::mbtools::utils::trap_mols $trappedmols
}
#Initialise Random Number Generator
#----------------------------------------------------------#
::mbtools::utils::init_random $params(n)
# ----------- Integration Parameters before warmup -----------#
setmd time_step $warm_time_step
setmd skin $verlet_skin
thermostat langevin $warmup_temp $langevin_gamma
# Set the topology and molecule information
#----------------------------------------------------------#
#write topology file
set f_topo [open "$outputdir/$ident.top" w]
blockfile_write_topology $f_topo write topology
close $f_topo
# Check if there are any extra vmdcommands and if not initialize a default
if { [catch { set dummy $vmdcommands } ] } {
set vmdcommands ""
}
::mbtools::utils::initialize_vmd $use_vmd $outputdir $ident -extracommands $vmdcommands
#Perform the warm up integration
#----------------------------------------------------------#
mmsg::send $this "warming up at [setmd temp]"
::mbtools::utils::warmup $warmsteps $warmtimes -cfgs 10 -outputdir $outputdir
# Bilayer systems may have been setup with fixed z positions for
# particles. Here we make sure that all particles are unfixed
# after warmup
set userfixedparts [::mbtools::system_generation::get_userfixedparts ]
for {set i 0} { $i < [setmd n_part] } {incr i} {
if { [lsearch $userfixedparts $i ] == -1 } {
part [expr $i] fix 0 0 0
}
}
setmd time_step $main_time_step
thermostat langevin [lindex $systemtemp 0] $langevin_gamma
::mmsg::send $this "warming up again at [setmd temp]"
::mbtools::utils::warmup $free_warmsteps $free_warmtimes -startcap 1000 -outputdir $outputdir -cfgs 10 -capgoal 5000
# ----------- Integration Parameters after warmup -----------#
setmd time_step $main_time_step
thermostat langevin [lindex $systemtemp 0] $langevin_gamma
mmsg::send $this "starting integration: run $int_n_times times $int_steps steps"
# Reset the time to a starttime (usually zero) after warmup
setmd time $startmdtime
} else {
# A checkpoint exists so all we need to do is reset the topology and setup analysis again
::mbtools::utils::read_topology "$outputdir/$topofile"
::mbtools::utils::initialize_vmd $use_vmd $outputdir $ident
# Yikes I hope this is right. We want to make sure that we start
# exactly from where the checkpoint was written
set startj $j
set startk [expr $k + 1]
}
#Main Integration #
#----------------------------------------------------------#
set j $startj
thermostat langevin $systemtemp $langevin_gamma
if { $thermo == "DPD" } {
thermostat off
thermostat set dpd $systemtemp $dpd_gamma $dpd_r_cut
mmsg::send $this "DPD thermostat has been set"
mmsg::send $this "Thermostat is: [thermostat]"
}
if { $npt == "on" } {
integrate set npt_isotropic $p_ext $piston_mass 1 0 0
mmsg::send $this "npt integrator has been set"
flush stdout
#-cubic_box
thermostat set npt_isotropic $systemtemp $gamma_0 $gamma_v
}
::mbtools::analysis::setup_analysis $analysis_flags -outputdir $outputdir -g $mgrid -str $stray_cut_off
set timingstart [clock clicks -milliseconds]
for {set k $startk } { $k < $int_n_times } { incr k} {
mmsg::send $this "run $k at time=[setmd time]"
# Call all of the analyze routines that we specified when setting
# up our analysis
::mbtools::analysis::do_analysis
# If k is a multiple of analysis_write_frequency then write the
# analysis results to file
if { $k%$analysis_write_frequency ==0 } {
::mbtools::analysis::print_averages
}
# If k is a multiple of write_frequency then write out a full
# particle configuration
if { $k%$write_frequency==0 } {
#polyBlockWrite "$outputdir/$ident.[format %04d $j].gz" {time box_l npt_p_diff } {id pos type v f molecule}
set out [open "|gzip -c - > $outputdir/$ident.[format %04d $j].gz" "w"]
blockfile $out write start "variable"
puts $out "time [setmd time]"
blockfile $out write end
blockfile $out write start "variable"
puts $out "box_l $box_l"
blockfile $out write end
blockfile $out write start "variable"
puts $out "npt_p_diff [setmd npt_p_diff]"
blockfile $out write end
blockfile $out write interactions
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
close $out
mmsg::send $this "wrote file $outputdir/$ident.[format %04d $j].gz "
flush stdout
if { $use_vmd == "offline" } {
writepdbfoldtopo "$outputdir/$ident.vmd[format %04d $j].pdb"
}
incr j
}
# Do the real work of integrating equations of motion
integrate $int_steps
set timingcurr [clock clicks -milliseconds]
set elapsedtime [expr $timingcurr - $timingstart]
::mmsg::send $this "elapsed time: $elapsedtime"
# Write a checkpoint to allow restarting. Overwrites previous
# checkpoint
mmsg::send $this "setting checkpoint $k [setmd time] $j"
#checkpoint_set "$outputdir/checkpoint.latest.gz"
set out [open "|gzip -c - > $outputdir/checkpoint.latest.gz" "w"]
blockfile $out write variable all
blockfile $out write tclvariable all
blockfile $out write interactions
blockfile $out write random
blockfile $out write bitrandom
blockfile $out write particles "id pos type p v f" all
blockfile $out write bonds all
blockfile $out write configs
close $out
# Try to copy a checkpoint to the backup checkpoint folder.
# Usefull if the program crashes while writing a checkpoint
if { [ catch { exec cp "$outputdir/checkpoint.latest.gz" "$outputdir/checkpoint_bak/checkpoint.latest.gz" } ] } {
mmsg::warn $this "warning: couldn't copy backup checkpoint"
}
}
# terminate program
mmsg::send $this "\n\nfinished"
exit 1
mbtools_tutorial/buckle/zero_stress/simplebilayer.tcl 0000644 0001750 0001750 00000012425 12413063427 023536 0 ustar patrick patrick # Copyright (C) 2010 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Max-Planck-Institute for Polymer Research, Theory Group, PO Box 3148, 55021 Mainz, Germany
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#
# Parameter file for simulating a one component flat lipid bilayer
# at fixed box size and temperature.
#
#
# To run this file use $ESPRESSO_SOURCE/$PLATFORM/Espresso ./scripts/main.tcl simplebilayer.tcl
#
# For more information about the simulation model on which this
# simulation is based see the following reference
#
# Cooke, I. R., Kremer, K. and Deserno, M.(2005): Tuneable, generic
# model for fluid bilayer membranes. Phys. Rev. E. 72 - 011506
#
::mmsg::send [namespace current] "loading parameter file .. " nonewline
flush stdout
# Specify the name of the job the location of forcetables and
# the output and scripts directories
set ident "NPxT_45_8_15"
set tabledir "./forcetables/"
set outputdir "./$ident/"
set topofile "$ident.top"
# Specify how we want to use vmd for visualization: allowable values
# are "interactive" "offline" "none". interactive rarely works
set use_vmd "offline"
# --- Specify a global key for molecule types -----#
# In this line we specify the details of all molecule types in the
# system. In this example molecule type 0 is assigned to be a lipid.
# The atom types in this lipid are 0 1 and 2 respectively and the
# bonding interactions are type 0 for short bonds and type 1 for long
# bonds.
set moltypes [list { 0 lipid { 0 1 2 } { 0 1 } } ]
# --- Specify the system geometry and composition ----#
# Set the geometry to flat
set geometry { geometry "flat -fixz" }
# Set the box size
set box_l 45.0
set setbox_l { 45.0 8.0 15.0 }
set area [expr [lindex $setbox_l 0]*[lindex $setbox_l 1]]
set nlipid [expr $area*2/1.25]
set n_molslist [subst { n_molslist { { 0 $nlipid } } }]
# Now bundle the above info into a list
lappend bilayerspec $geometry
lappend bilayerspec $n_molslist
# Now group the bilayerspec with other specs into a list of such
# systems (we can have multiple systems if we like each with different
# composition of molecule types
lappend system_specs $bilayerspec
# Warmup parameters
#----------------------------------------------------------#
set warm_time_step 0.002
set free_warmsteps 100
set free_warmtimes 50
# ---- NPT parameters --------- #
set npt on
set p_ext 0.000
set piston_mass 0.5
set gamma_0 1.0
set gamma_v 0.0001
# ------ Integration parameters -----------------#
set main_time_step 0.002
set verlet_skin 0.4
set langevin_gamma 1.0
set systemtemp 1.1
# The number of steps to integrate with each call to integrate
set int_steps 200
# The number of times to call integrate
set int_n_times 1000
# Write a configuration file every calls to
# integrate
set write_frequency 10
# Write results to analysis files every
# calls to integrate
set analysis_write_frequency 1
# Bonded and bending Potentials
#----------------------------------------------------------#
lappend bonded_parms [list 0 FENE 30 1.5 ]
lappend bonded_parms [list 1 harmonic 10.0 4.0 ]
# Non Bonded Potentials
#----------------------------------------------------------#
# Define the interactions between lipid heads and tails
# Useful Parameters
set lj_eps 1.0
set lj_cutoff 2.5
set ljshift 0.0
set ljoffset 0.0
set lj_sigmah 0.95
set lj_sigma 1.0
# Define the interaction matrix
lappend nb_interactions [list 0 0 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 1 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 2 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
# We use a special type of cosine attractive potential for the tail tail interactions.
lappend nb_interactions [list 1 1 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 1 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 2 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
# Analysis Parameters
#----------------------------------------------------------#
# These are are parameters that will be passed to the setup_analysis
# command when it is called in the main.tcl script.
set mgrid 8
set stray_cut_off 3
# Use these flags to specify which observables to calculate during the
# simulation. Values are calculated after every call to the espresso
# integrate command and written to files like
# time_vs_parametername. See the analysis package for more
# details
lappend analysis_flags stress_tensor
lappend analysis_flags boxl
lappend analysis_flags energy
::mmsg::send [namespace current] "done"
mbtools_tutorial/cylinder/ 0000755 0001750 0001750 00000000000 12413056662 016152 5 ustar patrick patrick mbtools_tutorial/cylinder/cylinder.tcl 0000644 0001750 0001750 00000012062 12413056662 020470 0 ustar patrick patrick # Parameter file for simulating a one component cylindrical vesicle
# at fixed box size and temperature.
#
#
# To run this file use $ESPRESSO_SOURCE/Espresso_bin ../scripts/main.tcl cylinder.tcl
#
# For more information about the simulation model on which this
# simulation is based see the following reference
#
# Cooke, I. R., Kremer, K. and Deserno, M.(2005): Tuneable, generic
# model for fluid bilayer membranes. Phys. Rev. E. 72 - 011506
#
puts " "
puts "============================================================="
puts " Parameter Script for the Simulation of a Cylindrical Vesicle"
puts "============================================================="
::mmsg::send [namespace current] "loading parameter file .. " nonewline
flush stdout
# specify L_z
set L_z 20
# Specify the name of the job the location of forcetables and
# the output and scripts directories
set ident "cylinder$L_z"
set tabledir "./forcetables/"
set outputdir "./$ident"
set topofile "$ident.top"
# Specify how we want to use vmd for visualization allowable values
# are "interactive" "offline" "none". interactive rarely works
set use_vmd "offline"
lappend vmdcommands "mol modcolor 0 0 segname"
lappend vmdcommands "mol modstyle 0 0 licorice 0.2 20 20"
# --- Specify a global key for molecule types -----#
# Here we specify the details of all molecule types in the
# system. In this example molecule type 0 is assigned to be a lipid.
# The atom types in this lipid are 0 and 1 respectively and the
# bonding interactions are type 0 for short bonds and type 1 for long
# bonds.
set moltypes [list { 0 lipid { 0 1 2 } { 0 1 } } ]
# --- Specify the system geometry and composition ----#
set geometry { geometry "cylinder -shuffle" }
# Use 1000 lipids (molecules of type 0 ) for the cylinder
set n_molslist { n_molslist { { 0 1000 } } }
# Now bundle the above info into a list
lappend cylindrspec $geometry
lappend cylindrspec $n_molslist
# Now group the bilayerspec with other specs into a list of such
# systems (we can have multiple systems if we like each with different
# composition of molecule types
lappend system_specs $cylindrspec
# Specify the system size
set box_l 40
set setbox_l " 40.0 40.0 $L_z "
lappend vmdcommands "pbc set \{ 40.0 40.0 $L_z\} -all"
lappend vmdcommands "pbc box"
setmd max_num_cells 4000
# Warmup parameters
#----------------------------------------------------------#
set warm_time_step 0.002
set free_warmsteps 0
set free_warmtimes 1
# ------ Integration parameters -----------------#
set main_time_step 0.002
set verlet_skin 0.4
set systemtemp 1.1
# NVT parameters
set thermo "Langevin" ;# "Langevin" or "DPD"
set langevin_gamma 1.0 ;# Langevin thermostat parameter
# The number of steps to integrate with each call to integrate
set int_steps 1000
# The number of times to call integrate
set int_n_times 100
# Total Integration time (in tau)
set total_int_time [expr $main_time_step*$int_n_times*$int_steps ]
puts "Total Integration Time: $total_int_time"
# Write a configuration file every calls
set write_frequency 1
# Write results to analysis files every calls
set analysis_write_frequency 1
# Bonded and bending Potentials
#----------------------------------------------------------#
lappend bonded_parms [list 0 FENE 30 1.5 ]
lappend bonded_parms [list 1 harmonic 10.0 4.0 ]
# Non Bonded Potentials
#----------------------------------------------------------#
# Define the forcetables to be used for the interaction of each pair of atom types
# Useful Parameters
set lj_eps 1.0
set lj_cutoff 2.5
set ljshift 0.0
set ljoffset 0.0
set lj_sigmah 0.95
set lj_sigma 1.0
# Define the interaction matrix
lappend nb_interactions [list 0 0 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 1 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
lappend nb_interactions [list 0 2 lennard-jones $lj_eps $lj_sigmah [expr 1.1225*$lj_sigmah] [expr 0.25*$lj_eps] $ljoffset ]
# We use a special type of cosine attractive potential for the tail tail interactions.
lappend nb_interactions [list 1 1 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 1 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
lappend nb_interactions [list 2 2 lj-cos2 $lj_eps $lj_sigma $ljoffset 1.6 ]
# Analysis Parameters
#----------------------------------------------------------#
# Use these flags to specify which observables to calculate during the
# simulation. Values are calculated after every call to the espresso
# integrate command and written to files like
# time_vs_parametername. See the module ::std_analysis for more
# details
#lappend analysis_flags boxl ;# calculate box length
lappend analysis_flags energy ;# calculate energy
#lappend analysis_flags pressure ;# pressure calculation
lappend analysis_flags stress_tensor ;# stress tensor calculation
lappend analysis_flags cylinder_radius ;# cylinder radius calculation
#lappend analysis_flags cluster ;# analyzing "clusters"
::mmsg::send [namespace current] "done"
mbtools_tutorial/cylinder/harmandaris06.pdf 0000644 0001750 0001750 00001122102 12413056662 021303 0 ustar patrick patrick %PDF-1.4
%쏢
5 0 obj
<>
stream
x}[Ǒކgmؚîkw)BDjW!`%03č
;gnf]39
E>U/?G.xY_??#0L7凳ٙ>0wo?/?ju>8i̹Q!:i|s݅j=ٙ}0緻m[g;76p
qp붞](mZnگ^yjv~ϯŨ;
WYopJMǿl{֫5zS|0fm]~SZ3y{\!0W--|arut-cI:^j+½lqԠu7(@0>iW4v^|w$Lݬ:Mo[o·Q.Ҵe]}\#
4M\(
崷ȏ
_/:-کeݯq Z
(dY-0YV\\;=܌Leټ:. 'K^{.7ܴY\?7`Mymj8
=Xv1{?z}/ɗzܦ5HFcݖ~
Û-EAy@18gԹ-.n3ƞ:
.a寧;he
g{-,߸8lS&NaP~l
F
>܈rx珻$Y{[\ؔ ºju۔nl;[L+b+l_VzVn;9<"+8#)_iMY|6KEh/gQp%Afy+ΚsUY0MŹ?s{Dk>r?ў]mcnM5D+ܝWa]ݠ6}y7/aECE~y"__EnҵRaͩl3mԅj{I>kf*1"-웴ٕq9.@_mM42FCC>Y)6]xS
Dxd-eri]P0dȠ.{EW%0&~Ove{)4JtwuGEP3@ W0);ɛH./#QvRH}2l`'@_m0$/X%M&1Ryً&iF? /TXQ-3'®J`}2{0#J&|ZpPO-)ʜџu,)+܍e{n,)s잓mr>
s5g
~n7ۦx5f[~L M9/*5Bf:"Б5NNAL*?ע^ CI|+I
&]Х]}$]CLmoPf#@
xQ8i¹\CoaN>Z"⠲;ٖzň"tuIfVi>(r]G`sS#z* 5Y(+[4e`^2msﭸj5l`1II "ϴq%Rq@5;x00SS3ۋ&TR[F gm3AFm0jeR)7Ҷqp>q>תI CJxhW.o@^!p%
۽-!H2HԣiɽwV[{,R(n$
B;:'I>>NeB1z \Eu-;fwW1(AoPLm+2Dҥ
$rsӖx&.'q*G{Հ竼ȍgtZp%$˿n
6a.&us ^߶N7N<os
6 ILagh8*ܫo(Z9ϲ/1rԭ`>hKwQ5esTfpg((@h:3?"JN]#-cґM }?1_7jp2 Mtaƒ/AJa\(Lz9ZB4\`KdlED'1q%2{[4ˬR:}`rkg7U/[OOڋZA1{/-c!T0IXA/"8\W$Uq?*$s&(.1'ӌM}/je^#lsė0ꉼ[Xd
wpܛ{ܬ:.F 4[}N5(jP]eVdyܒ5_tnRKb<rUSm:1^nUSe 9