diff --git a/model_extension/1comp/parameter_sweep.sh b/model_extension/1comp/parameter_sweep.sh index c448b76..0d34484 100644 --- a/model_extension/1comp/parameter_sweep.sh +++ b/model_extension/1comp/parameter_sweep.sh @@ -5,157 +5,96 @@ # Q2 concentrations: 0.2 0.16 0.15 0.14 0.12 0.1 0.08 0.06 0.04 0.01 # K2 concentrations: 0.2 0.15 0.12 0.1 0.08 0.07 0.06 0.05 0.04 0.01 -for USERVLP in "E2" #"EEE2" "E2" +for USERVLP in "E2" #"EEE2" #"E2" do -if [ "$USERVLP" = "EEE2" ]; then - echo "its EEE2!" - USERVLPCHARGE="-2085" - USERSIGMAHCRAW="5.15" - for USERSALTCONC in 0.6 0.57 0.55 0.53 0.5 0.4 0.2 0.1 0.04 0.01 - do - if [ "$USERSALTCONC" = 0.6 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.053505529124341" - USERVLPLinkerEScutoff="0.6045365500835798" - USERLinkerEScutoff="0.16092519609103764" - elif [ "$USERSALTCONC" = 0.57 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0551128166388066" - USERVLPLinkerEScutoff="0.6059652500964381" - USERLinkerEScutoff="0.1621753086022888" - elif [ "$USERSALTCONC" = 0.56 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.055827166645236" - USERVLPLinkerEScutoff="0.6065010126012601" - USERLinkerEScutoff="0.1627110711071107" - elif [ "$USERSALTCONC" = 0.55 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0563629291500578" - USERVLPLinkerEScutoff="0.607036775106082" - USERLinkerEScutoff="0.1632468336119326" - elif [ "$USERSALTCONC" = 0.53 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0577916291629161" - USERVLPLinkerEScutoff="0.6081083001157258" - USERLinkerEScutoff="0.1641397711199691" - elif [ "$USERSALTCONC" = 0.52 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0585059791693454" - USERVLPLinkerEScutoff="0.6086440626205477" - USERLinkerEScutoff="0.164675533624791" - elif [ "$USERSALTCONC" = 0.5 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0599346791822037" - USERVLPLinkerEScutoff="0.6098941751317988" - USERLinkerEScutoff="0.16574705863443487" - elif [ "$USERSALTCONC" = 0.4 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0686854667609618" - USERVLPLinkerEScutoff="0.6175734377009129" - USERLinkerEScutoff="0.17253338369551238" - elif [ "$USERSALTCONC" = 0.2 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" - USERLinkerEScutoff="0.1998572714414298" - elif [ "$USERSALTCONC" = 0.1 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" - USERLinkerEScutoff="0.23968228429985852" - elif [ "$USERSALTCONC" = 0.04 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" - USERLinkerEScutoff="0.3196894850199306" - elif [ "$USERSALTCONC" = 0.01 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" - USERLinkerEScutoff="0.5372090619776263" - fi - dir="$USERVLP"_c"$USERSALTCONC" - cp -a template/ $dir - cd $dir - sed -i 's/USERVLPCHARGE/'$USERVLPCHARGE'/g' in.1comp.template - sed -i 's/USERSIGMAHCRAW/'$USERSIGMAHCRAW'/g' in.1comp.template - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' in.1comp.template - sed -i 's/USERVLPEScutoff/'$USERVLPEScutoff'/g' in.1comp.template - sed -i 's/USERLinkerEScutoff/'$USERLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLPLinkerEScutoff/'$USERVLPLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLP/'$USERVLP'/g' assembly.pbs - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' assembly.pbs - sbatch assembly.pbs - cd .. - done -elif [ "$USERVLP" = "E2" ]; then +if [ "$USERVLP" = "E2" ]; then echo "its E2!" USERVLPCHARGE="-1500" - USERSIGMAHCRAW="4.75" - for USERSALTCONC in 0.3 #0.24 # 0.3 0.28 0.25 0.22 0.2 0.18 0.15 0.1 0.04 0.01 + USERSIGMAHCRAW="5.16" + for USERSALTCONC in 0.255 #0.3 0.28 0.27 0.26 0.25 0.245 0.24 0.22 0.2 0.18 0.15 0.1 0.04 0.01 do - + #copy E2 cutoffs here if [ "$USERSALTCONC" = 0.3 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0820795293815095" - USERVLPLinkerEScutoff="0.6290030378037803" + USERVLPEScutoff="1.082436704384724" + USERVLPLinkerEScutoff="0.6291816253053877" USERLinkerEScutoff="0.18271287128712868" elif [ "$USERSALTCONC" = 0.28 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0856512794136555" - USERVLPLinkerEScutoff="0.6318604378294971" - USERLinkerEScutoff="0.18539168381123824" + USERVLPEScutoff="1.0860084544168702" + USERVLPLinkerEScutoff="0.6320390253311045" + USERLinkerEScutoff="0.18539168381123824" + elif [ "$USERSALTCONC" = 0.27 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0877943294329433" + USERVLPLinkerEScutoff="0.6338249003471775" + USERLinkerEScutoff="0.1868203838240967" + elif [ "$USERSALTCONC" = 0.26 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.089937379452231" + USERVLPLinkerEScutoff="0.6354321878616432" + USERLinkerEScutoff="0.18842767133856242" + elif [ "$USERSALTCONC" = 0.255 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0910089044618747" + USERVLPLinkerEScutoff="0.636503712871287" + USERLinkerEScutoff="0.18914202134499164" elif [ "$USERSALTCONC" = 0.25 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0917232544683038" - USERVLPLinkerEScutoff="0.6372180628777162" - USERLinkerEScutoff="0.19003495885302812" + USERVLPEScutoff="1.0920804294715185" + USERVLPLinkerEScutoff="0.6373966503793236" + USERLinkerEScutoff="0.19003495885302812" + elif [ "$USERSALTCONC" = 0.245 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0931519544811623" + USERVLPLinkerEScutoff="0.6382895878873601" + USERLinkerEScutoff="0.19074930885945737" elif [ "$USERSALTCONC" = 0.24 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0940448919891987" - USERVLPLinkerEScutoff="0.6391825253953966" + USERVLPEScutoff="1.0944020669924135" + USERVLPLinkerEScutoff="0.6393611128970039" USERLinkerEScutoff="0.19164224636749386" elif [ "$USERSALTCONC" = 0.23 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.096545117011701" - USERVLPLinkerEScutoff="0.6413255754146843" + USERVLPEScutoff="1.0969022920149156" + USERVLPLinkerEScutoff="0.6415041629162915" USERLinkerEScutoff="0.19360670888517423" elif [ "$USERSALTCONC" = 0.22 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0990453420342032" - USERVLPLinkerEScutoff="0.6434686254339719" + USERVLPEScutoff="1.0995811045390254" + USERVLPLinkerEScutoff="0.6436472129355791" USERLinkerEScutoff="0.19557117140285454" elif [ "$USERSALTCONC" = 0.2 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" + USERVLPEScutoff="1.1054744920920663" + USERVLPLinkerEScutoff="0.648826250482191" USERLinkerEScutoff="0.1998572714414298" elif [ "$USERSALTCONC" = 0.18 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.111903642149929" - USERVLPLinkerEScutoff="0.6543624630320174" + USERVLPEScutoff="1.112439404654751" + USERVLPLinkerEScutoff="0.654719638035232" USERLinkerEScutoff="0.20503630898804162" elif [ "$USERSALTCONC" = 0.15 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1249405297672623" - USERVLPLinkerEScutoff="0.6656134756332774" + USERVLPEScutoff="1.1254762922720842" + USERVLPLinkerEScutoff="0.6657920631348848" USERLinkerEScutoff="0.21468003407483605" elif [ "$USERSALTCONC" = 0.1 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" + USERVLPEScutoff="1.1597650925806866" + USERVLPLinkerEScutoff="0.6949018258968753" USERLinkerEScutoff="0.23968228429985852" elif [ "$USERSALTCONC" = 0.04 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" + USERVLPEScutoff="1.2738825061077537" + USERVLPLinkerEScutoff="0.7909819017616047" USERLinkerEScutoff="0.3196894850199306" elif [ "$USERSALTCONC" = 0.01 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" + USERVLPEScutoff="1.6051623215893016" + USERVLPLinkerEScutoff="1.0638636042175647" USERLinkerEScutoff="0.5372090619776263" - fi + fi dir="$USERVLP"_c"$USERSALTCONC" cp -a template/ $dir cd $dir @@ -173,59 +112,60 @@ elif [ "$USERVLP" = "E2" ]; then elif [ "$USERVLP" = "Q2" ]; then USERVLPCHARGE="-1080" USERSIGMAHCRAW="4.45" - for USERSALTCONC in 0.2 0.16 0.15 0.14 0.12 0.1 0.08 0.06 0.04 0.01 + for USERSALTCONC in #add salt concs. do + # copy Q2 cutoffs here if [ "$USERSALTCONC" = 0.2 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" + USERVLPEScutoff="1.1054744920920663" + USERVLPLinkerEScutoff="0.648826250482191" USERLinkerEScutoff="0.1998572714414298" elif [ "$USERSALTCONC" = 0.17 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1158325671852898" - USERVLPLinkerEScutoff="0.6577556255625562" + USERVLPEScutoff="1.1163683296901117" + USERVLPLinkerEScutoff="0.6581128005657708" USERLinkerEScutoff="0.2078937090137585" elif [ "$USERSALTCONC" = 0.16 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.120118667223865" - USERVLPLinkerEScutoff="0.6615059630963095" + USERVLPEScutoff="1.1206544297286871" + USERVLPLinkerEScutoff="0.6616845505979169" USERLinkerEScutoff="0.21110828404268994" elif [ "$USERSALTCONC" = 0.15 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1249405297672623" - USERVLPLinkerEScutoff="0.6656134756332774" + USERVLPEScutoff="1.1254762922720842" + USERVLPLinkerEScutoff="0.6657920631348848" USERLinkerEScutoff="0.21468003407483605" elif [ "$USERSALTCONC" = 0.14 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1302981548154813" - USERVLPLinkerEScutoff="0.67007816317346" + USERVLPEScutoff="1.130655329818696" + USERVLPLinkerEScutoff="0.6702567506750674" USERLinkerEScutoff="0.2184303716085894" elif [ "$USERSALTCONC" = 0.12 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1427992799279927" - USERVLPLinkerEScutoff="0.6807934132698984" + USERVLPEScutoff="1.1433350424328148" + USERVLPLinkerEScutoff="0.6809720007715055" USERLinkerEScutoff="0.2277169216921692" elif [ "$USERSALTCONC" = 0.1 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" + USERVLPEScutoff="1.1597650925806866" + USERVLPLinkerEScutoff="0.6949018258968753" USERLinkerEScutoff="0.23968228429985852" elif [ "$USERSALTCONC" = 0.06 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2153058055805581" - USERVLPLinkerEScutoff="0.7420489263212035" + USERVLPEScutoff="1.2161987430885948" + USERVLPLinkerEScutoff="0.7425846888260254" USERLinkerEScutoff="0.2796858846598945" elif [ "$USERSALTCONC" = 0.04 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" + USERVLPEScutoff="1.2738825061077537" + USERVLPLinkerEScutoff="0.7909819017616047" USERLinkerEScutoff="0.3196894850199306" elif [ "$USERSALTCONC" = 0.01 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" + USERVLPEScutoff="1.6051623215893016" + USERVLPLinkerEScutoff="1.0638636042175647" USERLinkerEScutoff="0.5372090619776263" - fi + fi dir="$USERVLP"_c"$USERSALTCONC" cp -a template/ $dir cd $dir @@ -243,64 +183,65 @@ elif [ "$USERVLP" = "Q2" ]; then elif [ "$USERVLP" = "K2" ]; then USERVLPCHARGE="-600" USERSIGMAHCRAW="4.15" - for USERSALTCONC in 0.2 0.15 0.12 0.1 0.08 0.07 0.06 0.05 0.04 0.01 + for USERSALTCONC in #add salt concs. do + #copy K2 cutoffs here if [ "$USERSALTCONC" = 0.2 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" + USERVLPEScutoff="1.1054744920920663" + USERVLPLinkerEScutoff="0.648826250482191" USERLinkerEScutoff="0.1998572714414298" elif [ "$USERSALTCONC" = 0.15 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1249405297672623" - USERVLPLinkerEScutoff="0.6656134756332774" + USERVLPEScutoff="1.1254762922720842" + USERVLPLinkerEScutoff="0.6657920631348848" USERLinkerEScutoff="0.21468003407483605" elif [ "$USERSALTCONC" = 0.12 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1427992799279927" - USERVLPLinkerEScutoff="0.6807934132698984" + USERVLPEScutoff="1.1433350424328148" + USERVLPLinkerEScutoff="0.6809720007715055" USERLinkerEScutoff="0.2277169216921692" elif [ "$USERSALTCONC" = 0.1 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" + USERVLPEScutoff="1.1597650925806866" + USERVLPLinkerEScutoff="0.6949018258968753" USERLinkerEScutoff="0.23968228429985852" elif [ "$USERSALTCONC" = 0.08 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.181731355278385" - USERVLPLinkerEScutoff="0.7138321010672495" + USERVLPEScutoff="1.1824457052848143" + USERVLPLinkerEScutoff="0.7140106885688569" USERLinkerEScutoff="0.2557551594445159" elif [ "$USERSALTCONC" = 0.75 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.046540616561656" - USERVLPLinkerEScutoff="0.5984645750289314" + USERVLPEScutoff="1.0467192040632634" + USERVLPLinkerEScutoff="0.5986431625305386" USERLinkerEScutoff="0.15556757104281854" elif [ "$USERSALTCONC" = 0.07 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1967327054133985" - USERVLPLinkerEScutoff="0.7263332261797607" + USERVLPEScutoff="1.1974470554198278" + USERVLPLinkerEScutoff="0.7266904011829753" USERLinkerEScutoff="0.2664704095409541" elif [ "$USERSALTCONC" = 0.06 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2153058055805581" - USERVLPLinkerEScutoff="0.7420489263212035" + USERVLPEScutoff="1.2161987430885948" + USERVLPLinkerEScutoff="0.7425846888260254" USERLinkerEScutoff="0.2796858846598945" elif [ "$USERSALTCONC" = 0.05 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2397722933007587" - USERVLPLinkerEScutoff="0.7625864890060434" + USERVLPEScutoff="1.240486643307188" + USERVLPLinkerEScutoff="0.7629436640092581" USERLinkerEScutoff="0.2966516973125884" elif [ "$USERSALTCONC" = 0.04 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" + USERVLPEScutoff="1.2738825061077537" + USERVLPLinkerEScutoff="0.7909819017616047" USERLinkerEScutoff="0.3196894850199306" elif [ "$USERSALTCONC" = 0.01 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" + USERVLPEScutoff="1.6051623215893016" + USERVLPLinkerEScutoff="1.0638636042175647" USERLinkerEScutoff="0.5372090619776263" - fi + fi dir="$USERVLP"_c"$USERSALTCONC" cp -a template/ $dir cd $dir @@ -316,4 +257,4 @@ elif [ "$USERVLP" = "K2" ]; then cd .. done fi -done +done \ No newline at end of file diff --git a/model_extension/1comp/parameter_sweep_templatefile.sh b/model_extension/1comp/parameter_sweep_templatefile.sh deleted file mode 100644 index 51166e0..0000000 --- a/model_extension/1comp/parameter_sweep_templatefile.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -# EEE2 concentrations: 0.6 0.57 0.55 0.53 0.5 0.4 0.2 0.1 0.04 0.01 -# E2 concentrations: 0.3 0.28 0.25 0.22 0.2 0.18 0.15 0.1 0.04 0.01 -# Q2 concentrations: 0.2 0.16 0.15 0.14 0.12 0.1 0.08 0.06 0.04 0.01 -# K2 concentrations: 0.2 0.15 0.12 0.1 0.08 0.07 0.06 0.05 0.04 0.01 - -for USERVLP in "EEE2" #"E2" -do -if [ "$USERVLP" = "EEE2" ]; then - echo "its EEE2!" - USERVLPCHARGE="-2085" - USERSIGMAHCRAW="5.15" - for USERSALTCONC in #add salt concs. - do - #copy EEE2 cutoffs here - - dir="$USERVLP"_c"$USERSALTCONC" - cp -a template/ $dir - cd $dir - sed -i 's/USERVLPCHARGE/'$USERVLPCHARGE'/g' in.1comp.template - sed -i 's/USERSIGMAHCRAW/'$USERSIGMAHCRAW'/g' in.1comp.template - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' in.1comp.template - sed -i 's/USERVLPEScutoff/'$USERVLPEScutoff'/g' in.1comp.template - sed -i 's/USERLinkerEScutoff/'$USERLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLPLinkerEScutoff/'$USERVLPLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLP/'$USERVLP'/g' assembly.pbs - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' assembly.pbs - sbatch assembly.pbs - cd .. - done -elif [ "$USERVLP" = "E2" ]; then - echo "its E2!" - USERVLPCHARGE="-1500" - USERSIGMAHCRAW="4.75" - for USERSALTCONC in #add salt concs. - do - #copy E2 cutoffs here - - dir="$USERVLP"_c"$USERSALTCONC" - cp -a template/ $dir - cd $dir - sed -i 's/USERVLPCHARGE/'$USERVLPCHARGE'/g' in.1comp.template - sed -i 's/USERSIGMAHCRAW/'$USERSIGMAHCRAW'/g' in.1comp.template - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' in.1comp.template - sed -i 's/USERVLPEScutoff/'$USERVLPEScutoff'/g' in.1comp.template - sed -i 's/USERLinkerEScutoff/'$USERLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLPLinkerEScutoff/'$USERVLPLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLP/'$USERVLP'/g' assembly.pbs - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' assembly.pbs - sbatch assembly.pbs - cd .. - done -elif [ "$USERVLP" = "Q2" ]; then - USERVLPCHARGE="-1080" - USERSIGMAHCRAW="4.45" - for USERSALTCONC in #add salt concs. - do - # copy Q2 cutoffs here - - dir="$USERVLP"_c"$USERSALTCONC" - cp -a template/ $dir - cd $dir - sed -i 's/USERVLPCHARGE/'$USERVLPCHARGE'/g' in.1comp.template - sed -i 's/USERSIGMAHCRAW/'$USERSIGMAHCRAW'/g' in.1comp.template - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' in.1comp.template - sed -i 's/USERVLPEScutoff/'$USERVLPEScutoff'/g' in.1comp.template - sed -i 's/USERLinkerEScutoff/'$USERLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLPLinkerEScutoff/'$USERVLPLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLP/'$USERVLP'/g' assembly.pbs - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' assembly.pbs - sbatch assembly.pbs - cd .. - done -elif [ "$USERVLP" = "K2" ]; then - USERVLPCHARGE="-600" - USERSIGMAHCRAW="4.15" - for USERSALTCONC in #add salt concs. - do - #copy K2 cutoffs here - - dir="$USERVLP"_c"$USERSALTCONC" - cp -a template/ $dir - cd $dir - sed -i 's/USERVLPCHARGE/'$USERVLPCHARGE'/g' in.1comp.template - sed -i 's/USERSIGMAHCRAW/'$USERSIGMAHCRAW'/g' in.1comp.template - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' in.1comp.template - sed -i 's/USERVLPEScutoff/'$USERVLPEScutoff'/g' in.1comp.template - sed -i 's/USERLinkerEScutoff/'$USERLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLPLinkerEScutoff/'$USERVLPLinkerEScutoff'/g' in.1comp.template - sed -i 's/USERVLP/'$USERVLP'/g' assembly.pbs - sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' assembly.pbs - sbatch assembly.pbs - cd .. - done -fi -done \ No newline at end of file diff --git a/model_extension/1comp/script_for_cutoff_sweep.py b/model_extension/1comp/script_for_cutoff_sweep.py index a0c4b47..e168fd2 100644 --- a/model_extension/1comp/script_for_cutoff_sweep.py +++ b/model_extension/1comp/script_for_cutoff_sweep.py @@ -8,6 +8,7 @@ """ import numpy as np +import math lb = 0.714 #Bjerrum length, in nm aux = np.sqrt(8*lb*0.6022*np.pi) # the 0.6022 converts the unit of c from Molars to nm^-3 @@ -22,11 +23,27 @@ def yukawa(r, q1, q2, kappa, d1, d2): re = r[index[0]] ue[r>re] = 0. return ue + +#lj1 is the modified LJ potential: + +def lj1(r, sigmahc, d1, d2): + rmaxlj = sigmahc*(2**(1/6)) #lj cutoff without delta + delta = (d1+d2)/2 - sigmahc + rcut = rmaxlj + delta + aux = sigmahc/(r - delta) + ulj = 1+ 4*(pow(aux, 12) - pow(aux, 6)) + # ulj = 4*(pow(aux, 12) - pow(aux, 6)) + ulj[rrcut] = 0. + uljcut = ulj[r==rcut] + return ulj, rcut, uljcut r = np.linspace(0.001, 100, 10000) qd = 45 #dendrimer charge, units of e -Qv = -2085 #VLP charge, units of e +Qv = -2122 #VLP charge, units of e + +QVLP = [-2122, -1500, -1165, -631] Dv = 56 #VLP diameter, in nm dd = 6.7 #dendrimer diameter, in nm @@ -35,9 +52,9 @@ def yukawa(r, q1, q2, kappa, d1, d2): #c = [0.6, 0.57, 0.55, 0.53, 0.5, 0.45, 0.4, 0.35, 0.32, 0.3, 0.28, 0.25, 0.2, 0.18, 0.16, 0.15, 0.14, 0.12, 0.1, 0.08, 0.075, 0.07, 0.06, 0.05, 0.04, 0.01] # EEE2 concentrations: -c_EEE2 = [0.52]#[0.60, 0.57, 0.56, 0.55, 0.53, 0.50, 0.40, 0.20, 0.10, 0.04, 0.01] +c_EEE2 = [0.60, 0.57, 0.56, 0.55, 0.53, 0.50, 0.40, 0.20, 0.10, 0.04, 0.01] # E2 concentrations: -c_E2 = [0.23]#[0.30, 0.28, 0.25, 0.24, 0.22, 0.20, 0.18, 0.15, 0.10, 0.04, 0.01] +c_E2 = [0.30, 0.28, 0.25, 0.24, 0.22, 0.20, 0.18, 0.15, 0.10, 0.04, 0.01] # Q2 concentrations: c_Q2 = [0.20, 0.17, 0.16, 0.15, 0.14, 0.12, 0.10, 0.06, 0.04, 0.01] # K2 concentrations: @@ -78,10 +95,41 @@ def finish(): fi ''' return s +def getmins(Q, c, sigmahc): + kappa = 3.287*np.sqrt(c) + ue12, re = yukawa(r, Q, qd, kappa, Dv, dd) + rclosest_raw = np.zeros(len(sigmahc)) + umin = np.zeros(len(sigmahc)) + + + for i in range(len(sigmahc)): + sig = sigmahc[i] + ulj12, rcut12, uljcut12 = lj1(r, sig, D, dd) + + delta12 = (D + dd)/2 - sig + d12_ru = delta12/D + + unet12 = ue12 + ulj12 + closest = np.min(unet12) + #print(sig, closest, rcut12 ) + val_closest = np.where(unet12==closest) + index = val_closest[0] + rc = r[index[0]] + + rclosest_raw[i] = rc + umin[i] = closest + + rclosest = gaussian_filter1d(rclosest_raw, sigma=5) + return rclosest, umin + cutoffs_EEE2 = header() +mins_EEE2 = header() cutoffs_E2 = header() +mins_E2 = header() cutoffs_Q2 = header() +mins_Q2 = header() cutoffs_K2 = header() +mins_K2 = header() for j in range(len(VLPS)): VLP = VLPS[j] diff --git a/model_extension/1comp/script_for_cutoff_sweep_plusmins.py b/model_extension/1comp/script_for_cutoff_sweep_plusmins.py new file mode 100644 index 0000000..421f30f --- /dev/null +++ b/model_extension/1comp/script_for_cutoff_sweep_plusmins.py @@ -0,0 +1,190 @@ +# -*- coding: utf-8 -*- +""" +Created on Wed Nov 15 13:30:56 2023 + +@author: cfaccini +creates the lines to be added to the parameter weep file, with the cutoff values for each salt concentration. +Calculations done for EEE2 Q=-2085e, q=45e. Cutoff parameter is |ue|<0.005kBT +""" + +import numpy as np +import math +from scipy.ndimage import gaussian_filter1d + +lb = 0.714 #Bjerrum length, in nm +aux = np.sqrt(8*lb*0.6022*np.pi) # the 0.6022 converts the unit of c from Molars to nm^-3 + + +def yukawa(r, q1, q2, kappa, d1, d2): + aux1 = (q1/(1+kappa*(d1/2)))*np.exp(kappa*(d1/2)) + aux2 = (q2/(1+kappa*(d2/2)))*np.exp(kappa*(d2/2)) + ue = (1/r)*aux1*aux2*lb*np.exp(-kappa*r) + val = np.where(np.absolute(ue) <= 0.005) + index = val[0] + re = r[index[0]] + ue[r>re] = 0. + return ue + +#lj1 is the modified LJ potential: + +def lj1(r, sigmahc, d1, d2): + rmaxlj = sigmahc*(2**(1/6)) #lj cutoff without delta + delta = (d1+d2)/2 - sigmahc + rcut = rmaxlj + delta + aux = sigmahc/(r - delta) + ulj = 1+ 4*(pow(aux, 12) - pow(aux, 6)) + # ulj = 4*(pow(aux, 12) - pow(aux, 6)) + ulj[rrcut] = 0. + uljcut = ulj[r==rcut] + return ulj, rcut, uljcut + +r = np.linspace(0.001, 100, 10000) + +qd = 45 #dendrimer charge, units of e +Qv = -2122 #VLP charge, units of e + +QVLP = [-2122, -1500, -1165, -622] +sigmaVLP = [5.16, 5.16, 3.35, 4.78] + +Dv = 56 #VLP diameter, in nm +dd = 6.7 #dendrimer diameter, in nm + +#INCLUDE HERE DESIRED SALT CONCENTRATIONS IN MOLARS: +#c = [0.6, 0.57, 0.55, 0.53, 0.5, 0.45, 0.4, 0.35, 0.32, 0.3, 0.28, 0.25, 0.2, 0.18, 0.16, 0.15, 0.14, 0.12, 0.1, 0.08, 0.075, 0.07, 0.06, 0.05, 0.04, 0.01] + +# EEE2 concentrations: +c_EEE2 = [0.6, 0.57, 0.55, 0.54, 0.5, 0.4, 0.35, 0.325, 0.31, 0.3, 0.27, 0.245, 0.1, 0.04] +# E2 concentrations: +c_E2 = [0.6, 0.57, 0.55, 0.54, 0.5, 0.4, 0.35, 0.325, 0.31, 0.3, 0.275, 0.27, 0.245, 0.20, 0.18, 0.16, 0.15, 0.125, 0.1, 0.075, 0.04] +# Q2 concentrations: +c_Q2 = [0.3, 0.275, 0.26, 0.245, 0.20, 0.19, 0.18, 0.16, 0.125, 0.1, 0.04 ] +# K2 concentrations: +c_K2 = [0.3, 0.275, 0.245, 0.20, 0.15, 0.13, 0.125, 0.1, 0.075, 0.04] + +concs = [c_EEE2, c_E2, c_Q2, c_K2] + +VLPS = ['EEE2', 'E2', 'Q2', 'K2'] + +def header(): + s = ''' + #copy following lines to the sweep parameter file: + ''' + return s + +def header2(Q, sigma): + s = f''' + #unet minimums between V-d for {Q} with sigma={sigma} nm: \n + ''' + return s + +def firstc(salt, VVes, Vdes, ddes): + s = f''' + if [ "$USERSALTCONC" = {salt} ]; then + echo $USERSALTCONC + USERVLPEScutoff="{VVes}" + USERVLPLinkerEScutoff="{Vdes}" + USERLinkerEScutoff="{ddes}" ''' + + return s + +def allc(salt, VVes, Vdes, ddes): + s = f''' + elif [ "$USERSALTCONC" = {salt} ]; then + echo $USERSALTCONC + USERVLPEScutoff="{VVes}" + USERVLPLinkerEScutoff="{Vdes}" + USERLinkerEScutoff="{ddes}" ''' + + return s + +def tablemins(salt, closest): + s = f''' + {salt} {closest} \n ''' + return s + +def finish(): + s = ''' + fi ''' + return s + + +cutoffs_EEE2 = header() +mins_EEE2 = header2('EEE2', sigmaVLP[0]) +cutoffs_E2 = header() +mins_E2 = header2('E2', sigmaVLP[1]) +cutoffs_Q2 = header() +mins_Q2 = header2('Q2', sigmaVLP[2]) +cutoffs_K2 = header() +mins_K2 = header2('K2', sigmaVLP[3]) + +for j in range(len(VLPS)): + VLP = VLPS[j] + Q = QVLP[j] + sigma = sigmaVLP[j] + print(VLP, Q, sigma) + c = concs[j] + kappa = aux*np.sqrt(c) + + ulj, rcut, uljcut = lj1(r, sigma, Dv, dd) + + for i in range(len(c)): + salt = c[i] + # print(salt) + kappa1 = kappa[i] + ue_VV = yukawa(r, Qv, Qv, kappa1, Dv, Dv) + ue_Vd = yukawa(r, Qv, qd, kappa1, Dv, dd) + ue_dd = yukawa(r, qd, qd, kappa1, dd, dd) + + val11 = np.where(ue_VV < 0.005) + index11 = val11[0] + re11 = r[index11[0]] + val12 = np.where(np.absolute(ue_Vd) <= 0.005) + index12 = val12[0] + re12 = r[index12[0]] + val22 = np.where(ue_dd <= 0.005) + index22 = val22[0] + re22 = r[index22[0]] + + VVes = re11/Dv + Vdes = re12/Dv + ddes = re22/Dv + + ue_alt = yukawa(r, Q, qd, kappa1, Dv, dd) + unet = ue_alt + ulj + closest = np.min(unet) + print(salt, closest) + + if j == 0: + mins_EEE2+=tablemins(salt, closest) + if i == 0: + cutoffs_EEE2+= firstc(salt, VVes, Vdes, ddes) + else: + cutoffs_EEE2+= allc(salt, VVes, Vdes, ddes) + if j == 1: + mins_E2+=tablemins(salt, closest) + if i == 0: + cutoffs_E2+= firstc(salt, VVes, Vdes, ddes) + else: + cutoffs_E2+= allc(salt, VVes, Vdes, ddes) + if j == 2: + mins_Q2+=tablemins(salt, closest) + if i == 0: + cutoffs_Q2+= firstc(salt, VVes, Vdes, ddes) + else: + cutoffs_Q2+= allc(salt, VVes, Vdes, ddes) + if j == 3: + mins_K2+=tablemins(salt, closest) + if i == 0: + cutoffs_K2+= firstc(salt, VVes, Vdes, ddes) + else: + cutoffs_K2+= allc(salt, VVes, Vdes, ddes) + + +cutoffs_EEE2+= finish() +cutoffs_E2+= finish() +cutoffs_Q2+= finish() +cutoffs_K2+= finish() + + + diff --git a/model_extension/1comp/template/in.1comp.template b/model_extension/1comp/template/in.1comp.template index 4a30524..20d3bb1 100644 --- a/model_extension/1comp/template/in.1comp.template +++ b/model_extension/1comp/template/in.1comp.template @@ -39,8 +39,8 @@ variable SIGMAHC equal v_SIGMAHCRAW/v_VLPDiameterRAW variable VLPLinkerLJcutoff equal v_SIGMAHC*(2^(1.0/6.0)) # 2^(1/6) times the VLP-linker interaction lengthscale variable DELTA equal (1+v_LinkerDiameter)*0.5-v_SIGMAHC # in reduced units variable KAPPA equal v_VLPDiameterRAW*sqrt(8*v_lB*v_SALTCONC*PI*0.6022141) # in reduced units of (1 / vlp diameter) -variable VLPChargeDLVO equal (v_VLPCharge*exp(v_KAPPA*0.5)/(1+v_KAPPA*0.5))*(1.000676522) # KAPPA is already in reduced units of the simulation -variable LinkerChargeDLVO equal (v_LinkerCharge*exp(v_KAPPA*v_LinkerDiameter*0.5)/(1+v_KAPPA*v_LinkerDiameter*0.5))*(1.000676522) # both KAPPA and Linker diameter are in reduced units +variable VLPChargeDLVO equal (v_VLPCharge*exp(v_KAPPA*0.5)/(1+v_KAPPA*0.5))*(1.00065763) # KAPPA is already in reduced units of the simulation +variable LinkerChargeDLVO equal (v_LinkerCharge*exp(v_KAPPA*v_LinkerDiameter*0.5)/(1+v_KAPPA*v_LinkerDiameter*0.5))*(1.00065763) # both KAPPA and Linker diameter are in reduced units print "***** Linker diameter = ${LinkerDiameter} *****" print "***** sigmahc = ${SIGMAHC} *****" diff --git a/model_extension/2comp/rapid_dilution/parameter_sweep.sh b/model_extension/2comp/rapid_dilution/parameter_sweep.sh index 450ee62..7b319c0 100644 --- a/model_extension/2comp/rapid_dilution/parameter_sweep.sh +++ b/model_extension/2comp/rapid_dilution/parameter_sweep.sh @@ -1,8 +1,8 @@ #!/bin/bash # EEE2+E2 concentrations: 0.6 0.57 0.55 0.5 0.4 0.3 0.27 0.245 0.1 0.04 -# E2+Q2 concentrations: 0.3 0.275 0.245 0.20 0.18 0.16 0.125 0.10 0.04 -# E2+K2 concentrations: 0.3 0.275 0.245 0.20 0.15 0.125 0.10 0.075 0.04 +# E2+Q2 concentrations: 0.3 0.275 0.245 0.2 0.18 0.16 0.125 0.1 0.04 +# E2+K2 concentrations: 0.3 0.275 0.245 0.2 0.15 0.125 0.1 0.075 0.04 for TWOCOMP in "EEE2E2" do @@ -14,69 +14,109 @@ if [ "$TWOCOMP" = "EEE2E2" ]; then USERSIGMAHC1RAW="5.16" USERVLP2CHARGE="-1500" USERSIGMAHC2RAW="5.16" - for USERSALTCONC in 0.6 0.57 0.55 0.5 0.4 0.3 0.27 0.245 0.1 0.04 - do + for USERSALTCONC in 0.35 0.325 0.31 #0.6 0.57 0.55 0.5 0.4 0.3 0.27 0.245 0.1 0.04 + do if [ "$USERSALTCONC" = 0.6 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.053505529124341" + USERVLPEScutoff="1.0536841166259483" USERVLPLinkerEScutoff="0.6045365500835798" USERLinkerEScutoff="0.16092519609103764" elif [ "$USERSALTCONC" = 0.57 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0551128166388066" - USERVLPLinkerEScutoff="0.6059652500964381" + USERVLPEScutoff="1.0554699916420212" + USERVLPLinkerEScutoff="0.6061438375980455" USERLinkerEScutoff="0.1621753086022888" - elif [ "$USERSALTCONC" = 0.56 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.055827166645236" - USERVLPLinkerEScutoff="0.6065010126012601" - USERLinkerEScutoff="0.1627110711071107" elif [ "$USERSALTCONC" = 0.55 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0563629291500578" - USERVLPLinkerEScutoff="0.607036775106082" - USERLinkerEScutoff="0.1632468336119326" - elif [ "$USERSALTCONC" = 0.53 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0577916291629161" - USERVLPLinkerEScutoff="0.6081083001157258" - USERLinkerEScutoff="0.1641397711199691" - elif [ "$USERSALTCONC" = 0.52 ]; then + USERVLPEScutoff="1.0567201041532723" + USERVLPLinkerEScutoff="0.6072153626076892" + USERLinkerEScutoff="0.1632468336119326" + elif [ "$USERSALTCONC" = 0.54 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0585059791693454" - USERVLPLinkerEScutoff="0.6086440626205477" - USERLinkerEScutoff="0.164675533624791" + USERVLPEScutoff="1.0572558666580942" + USERVLPLinkerEScutoff="0.6077511251125112" + USERLinkerEScutoff="0.1636040086151472" elif [ "$USERSALTCONC" = 0.5 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0599346791822037" - USERVLPLinkerEScutoff="0.6098941751317988" + USERVLPEScutoff="1.0601132666838111" + USERVLPLinkerEScutoff="0.6100727626334062" USERLinkerEScutoff="0.16574705863443487" elif [ "$USERSALTCONC" = 0.4 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.0686854667609618" - USERVLPLinkerEScutoff="0.6175734377009129" - USERLinkerEScutoff="0.17253338369551238" + USERVLPEScutoff="1.0690426417641763" + USERVLPLinkerEScutoff="0.6177520252025201" + USERLinkerEScutoff="0.17253338369551238" + elif [ "$USERSALTCONC" = 0.35 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0749360293172174" + USERVLPLinkerEScutoff="0.6227524752475248" + USERLinkerEScutoff="0.1771766587373023" + elif [ "$USERSALTCONC" = 0.325 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0785077793493634" + USERVLPLinkerEScutoff="0.6257884627748488" + USERLinkerEScutoff="0.17967688375980453" + elif [ "$USERSALTCONC" = 0.31 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0808294168702584" + USERVLPLinkerEScutoff="0.6277529252925291" + USERLinkerEScutoff="0.18146275877587756" + elif [ "$USERSALTCONC" = 0.3 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.082436704384724" + USERVLPLinkerEScutoff="0.6291816253053877" + USERLinkerEScutoff="0.18271287128712868" + elif [ "$USERSALTCONC" = 0.275 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0869013919249066" + USERVLPLinkerEScutoff="0.632931962839141" + USERLinkerEScutoff="0.18610603381766747" + elif [ "$USERSALTCONC" = 0.27 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0877943294329433" + USERVLPLinkerEScutoff="0.6338249003471775" + USERLinkerEScutoff="0.1868203838240967" + elif [ "$USERSALTCONC" = 0.245 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0931519544811623" + USERVLPLinkerEScutoff="0.6382895878873601" + USERLinkerEScutoff="0.19074930885945737" elif [ "$USERSALTCONC" = 0.2 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" + USERVLPEScutoff="1.1054744920920663" + USERVLPLinkerEScutoff="0.648826250482191" USERLinkerEScutoff="0.1998572714414298" + elif [ "$USERSALTCONC" = 0.18 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.112439404654751" + USERVLPLinkerEScutoff="0.654719638035232" + USERLinkerEScutoff="0.20503630898804162" + elif [ "$USERSALTCONC" = 0.16 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.1206544297286871" + USERVLPLinkerEScutoff="0.6616845505979169" + USERLinkerEScutoff="0.21110828404268994" + elif [ "$USERSALTCONC" = 0.15 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.1254762922720842" + USERVLPLinkerEScutoff="0.6657920631348848" + USERLinkerEScutoff="0.21468003407483605" + elif [ "$USERSALTCONC" = 0.125 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.1399418799022758" + USERVLPLinkerEScutoff="0.6781146007457888" + USERLinkerEScutoff="0.22521669666966695" elif [ "$USERSALTCONC" = 0.1 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" + USERVLPEScutoff="1.1597650925806866" + USERVLPLinkerEScutoff="0.6949018258968753" USERLinkerEScutoff="0.23968228429985852" elif [ "$USERSALTCONC" = 0.04 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" + USERVLPEScutoff="1.2738825061077537" + USERVLPLinkerEScutoff="0.7909819017616047" USERLinkerEScutoff="0.3196894850199306" - elif [ "$USERSALTCONC" = 0.01 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" - USERLinkerEScutoff="0.5372090619776263" - fi + fi dir="$USERVLP1"_"$USERVLP2"_c"$USERSALTCONC" cp -a template/ $dir cd $dir @@ -91,7 +131,7 @@ if [ "$TWOCOMP" = "EEE2E2" ]; then sed -i 's/USERVLP1/'$USERVLP1'/g' assembly.pbs sed -i 's/USERVLP2/'$USERVLP2'/g' assembly.pbs sed -i 's/USERSALTCONC/'$USERSALTCONC'/g' assembly.pbs - #sbatch assembly.pbs + sbatch assembly.pbs cd .. done elif [ "$TWOCOMP" = "E2Q2" ]; then @@ -102,70 +142,89 @@ elif [ "$TWOCOMP" = "E2Q2" ]; then USERSIGMAHC1RAW="5.16" USERVLP2CHARGE="-1165" USERSIGMAHC2RAW="4" - for USERSALTCONC in 0.3 0.275 0.245 0.20 0.18 0.16 0.125 0.10 0.04 - do - - if [ "$USERSALTCONC" = 0.3 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0820795293815095" - USERVLPLinkerEScutoff="0.6290030378037803" - USERLinkerEScutoff="0.18271287128712868" - elif [ "$USERSALTCONC" = 0.28 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0856512794136555" - USERVLPLinkerEScutoff="0.6318604378294971" - USERLinkerEScutoff="0.18539168381123824" - elif [ "$USERSALTCONC" = 0.25 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0917232544683038" - USERVLPLinkerEScutoff="0.6372180628777162" - USERLinkerEScutoff="0.19003495885302812" - elif [ "$USERSALTCONC" = 0.24 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0940448919891987" - USERVLPLinkerEScutoff="0.6391825253953966" - USERLinkerEScutoff="0.19164224636749386" - elif [ "$USERSALTCONC" = 0.23 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.096545117011701" - USERVLPLinkerEScutoff="0.6413255754146843" - USERLinkerEScutoff="0.19360670888517423" - elif [ "$USERSALTCONC" = 0.22 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.0990453420342032" - USERVLPLinkerEScutoff="0.6434686254339719" - USERLinkerEScutoff="0.19557117140285454" + for USERSALTCONC in 0.3 0.275 0.245 0.2 0.18 0.16 0.125 0.1 0.04 + do + if [ "$USERSALTCONC" = 0.6 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0536841166259483" + USERVLPLinkerEScutoff="0.6045365500835798" + USERLinkerEScutoff="0.16092519609103764" + elif [ "$USERSALTCONC" = 0.57 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0554699916420212" + USERVLPLinkerEScutoff="0.6061438375980455" + USERLinkerEScutoff="0.1621753086022888" + elif [ "$USERSALTCONC" = 0.55 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0567201041532723" + USERVLPLinkerEScutoff="0.6072153626076892" + USERLinkerEScutoff="0.1632468336119326" + elif [ "$USERSALTCONC" = 0.5 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0601132666838111" + USERVLPLinkerEScutoff="0.6100727626334062" + USERLinkerEScutoff="0.16574705863443487" + elif [ "$USERSALTCONC" = 0.4 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0690426417641763" + USERVLPLinkerEScutoff="0.6177520252025201" + USERLinkerEScutoff="0.17253338369551238" + elif [ "$USERSALTCONC" = 0.3 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.082436704384724" + USERVLPLinkerEScutoff="0.6291816253053877" + USERLinkerEScutoff="0.18271287128712868" + elif [ "$USERSALTCONC" = 0.275 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0869013919249066" + USERVLPLinkerEScutoff="0.632931962839141" + USERLinkerEScutoff="0.18610603381766747" + elif [ "$USERSALTCONC" = 0.27 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0877943294329433" + USERVLPLinkerEScutoff="0.6338249003471775" + USERLinkerEScutoff="0.1868203838240967" + elif [ "$USERSALTCONC" = 0.245 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0931519544811623" + USERVLPLinkerEScutoff="0.6382895878873601" + USERLinkerEScutoff="0.19074930885945737" elif [ "$USERSALTCONC" = 0.2 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" + USERVLPEScutoff="1.1054744920920663" + USERVLPLinkerEScutoff="0.648826250482191" USERLinkerEScutoff="0.1998572714414298" elif [ "$USERSALTCONC" = 0.18 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.111903642149929" - USERVLPLinkerEScutoff="0.6543624630320174" + USERVLPEScutoff="1.112439404654751" + USERVLPLinkerEScutoff="0.654719638035232" USERLinkerEScutoff="0.20503630898804162" + elif [ "$USERSALTCONC" = 0.16 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.1206544297286871" + USERVLPLinkerEScutoff="0.6616845505979169" + USERLinkerEScutoff="0.21110828404268994" elif [ "$USERSALTCONC" = 0.15 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1249405297672623" - USERVLPLinkerEScutoff="0.6656134756332774" + USERVLPEScutoff="1.1254762922720842" + USERVLPLinkerEScutoff="0.6657920631348848" USERLinkerEScutoff="0.21468003407483605" + elif [ "$USERSALTCONC" = 0.125 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.1399418799022758" + USERVLPLinkerEScutoff="0.6781146007457888" + USERLinkerEScutoff="0.22521669666966695" elif [ "$USERSALTCONC" = 0.1 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" + USERVLPEScutoff="1.1597650925806866" + USERVLPLinkerEScutoff="0.6949018258968753" USERLinkerEScutoff="0.23968228429985852" elif [ "$USERSALTCONC" = 0.04 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" + USERVLPEScutoff="1.2738825061077537" + USERVLPLinkerEScutoff="0.7909819017616047" USERLinkerEScutoff="0.3196894850199306" - elif [ "$USERSALTCONC" = 0.01 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" - USERLinkerEScutoff="0.5372090619776263" - fi + fi dir="$USERVLP1"_"$USERVLP2"_c"$USERSALTCONC" cp -a template/ $dir cd $dir @@ -191,59 +250,89 @@ elif [ "$TWOCOMP" = "E2K2" ]; then USERSIGMAHC2RAW="4" USERVLP1="E2" USERVLP2="K2" - for USERSALTCONC in 0.3 0.275 0.245 0.20 0.15 0.125 0.10 0.075 0.04 + for USERSALTCONC in 0.3 0.275 0.245 0.2 0.15 0.125 0.1 0.075 0.04 do - if [ "$USERSALTCONC" = 0.2 ]; then + if [ "$USERSALTCONC" = 0.6 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0536841166259483" + USERVLPLinkerEScutoff="0.6045365500835798" + USERLinkerEScutoff="0.16092519609103764" + elif [ "$USERSALTCONC" = 0.57 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1049387295872444" - USERVLPLinkerEScutoff="0.6484690754789764" - USERLinkerEScutoff="0.1998572714414298" - elif [ "$USERSALTCONC" = 0.17 ]; then + USERVLPEScutoff="1.0554699916420212" + USERVLPLinkerEScutoff="0.6061438375980455" + USERLinkerEScutoff="0.1621753086022888" + elif [ "$USERSALTCONC" = 0.55 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1158325671852898" - USERVLPLinkerEScutoff="0.6577556255625562" - USERLinkerEScutoff="0.2078937090137585" + USERVLPEScutoff="1.0567201041532723" + USERVLPLinkerEScutoff="0.6072153626076892" + USERLinkerEScutoff="0.1632468336119326" + elif [ "$USERSALTCONC" = 0.5 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0601132666838111" + USERVLPLinkerEScutoff="0.6100727626334062" + USERLinkerEScutoff="0.16574705863443487" + elif [ "$USERSALTCONC" = 0.4 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0690426417641763" + USERVLPLinkerEScutoff="0.6177520252025201" + USERLinkerEScutoff="0.17253338369551238" + elif [ "$USERSALTCONC" = 0.3 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.082436704384724" + USERVLPLinkerEScutoff="0.6291816253053877" + USERLinkerEScutoff="0.18271287128712868" + elif [ "$USERSALTCONC" = 0.275 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0869013919249066" + USERVLPLinkerEScutoff="0.632931962839141" + USERLinkerEScutoff="0.18610603381766747" + elif [ "$USERSALTCONC" = 0.27 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0877943294329433" + USERVLPLinkerEScutoff="0.6338249003471775" + USERLinkerEScutoff="0.1868203838240967" + elif [ "$USERSALTCONC" = 0.245 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.0931519544811623" + USERVLPLinkerEScutoff="0.6382895878873601" + USERLinkerEScutoff="0.19074930885945737" + elif [ "$USERSALTCONC" = 0.2 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.1054744920920663" + USERVLPLinkerEScutoff="0.648826250482191" + USERLinkerEScutoff="0.1998572714414298" + elif [ "$USERSALTCONC" = 0.18 ]; then + echo $USERSALTCONC + USERVLPEScutoff="1.112439404654751" + USERVLPLinkerEScutoff="0.654719638035232" + USERLinkerEScutoff="0.20503630898804162" elif [ "$USERSALTCONC" = 0.16 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.120118667223865" - USERVLPLinkerEScutoff="0.6615059630963095" + USERVLPEScutoff="1.1206544297286871" + USERVLPLinkerEScutoff="0.6616845505979169" USERLinkerEScutoff="0.21110828404268994" elif [ "$USERSALTCONC" = 0.15 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1249405297672623" - USERVLPLinkerEScutoff="0.6656134756332774" + USERVLPEScutoff="1.1254762922720842" + USERVLPLinkerEScutoff="0.6657920631348848" USERLinkerEScutoff="0.21468003407483605" - elif [ "$USERSALTCONC" = 0.14 ]; then + elif [ "$USERSALTCONC" = 0.125 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1302981548154813" - USERVLPLinkerEScutoff="0.67007816317346" - USERLinkerEScutoff="0.2184303716085894" - elif [ "$USERSALTCONC" = 0.12 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.1427992799279927" - USERVLPLinkerEScutoff="0.6807934132698984" - USERLinkerEScutoff="0.2277169216921692" + USERVLPEScutoff="1.1399418799022758" + USERVLPLinkerEScutoff="0.6781146007457888" + USERLinkerEScutoff="0.22521669666966695" elif [ "$USERSALTCONC" = 0.1 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.1592293300758647" - USERVLPLinkerEScutoff="0.694723238395268" + USERVLPEScutoff="1.1597650925806866" + USERVLPLinkerEScutoff="0.6949018258968753" USERLinkerEScutoff="0.23968228429985852" - elif [ "$USERSALTCONC" = 0.06 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.2153058055805581" - USERVLPLinkerEScutoff="0.7420489263212035" - USERLinkerEScutoff="0.2796858846598945" elif [ "$USERSALTCONC" = 0.04 ]; then echo $USERSALTCONC - USERVLPEScutoff="1.2729895685997172" - USERVLPLinkerEScutoff="0.7904461392567826" + USERVLPEScutoff="1.2738825061077537" + USERVLPLinkerEScutoff="0.7909819017616047" USERLinkerEScutoff="0.3196894850199306" - elif [ "$USERSALTCONC" = 0.01 ]; then - echo $USERSALTCONC - USERVLPEScutoff="1.6031978590716214" - USERVLPLinkerEScutoff="1.0627920792079206" - USERLinkerEScutoff="0.5372090619776263" - fi + fi dir="$USERVLP1"_"$USERVLP2"_c"$USERSALTCONC" cp -a template/ $dir cd $dir diff --git a/model_extension/cutoffs.txt b/model_extension/cutoffs.txt index 58bf780..56a2692 100644 --- a/model_extension/cutoffs.txt +++ b/model_extension/cutoffs.txt @@ -1,69 +1,69 @@ -0.01 1.6033764465732288 1.062970666709528 0.5372090619776263 -0.02 1.4072873698084094 0.9022419152629547 0.41023334833483344 -0.03 1.3226368940465476 0.8318784396296772 0.35362111032531823 -0.04 1.2729895685997172 0.79062472675839 0.3196894850199306 -0.05 1.2397722933007587 0.7625864890060434 0.2966516973125884 -0.060000000000000005 1.2154843930821655 0.7422275138228107 0.2796858846598945 -0.06999999999999999 1.1967327054133985 0.7263332261797607 0.2664704095409541 -0.08 1.181731355278385 0.7138321010672495 0.2557551594445159 -0.09 1.1695874051690882 0.7034740259740259 0.24700437186575797 -0.09999999999999999 1.1592293300758647 0.694723238395268 0.23968228429985852 -0.11 1.150478542497107 0.6872225633277613 0.23325313424199562 -0.12 1.1427992799279927 0.6807934132698984 0.2277169216921692 -0.13 1.1361915423685225 0.6750786132184646 0.222895059148772 -0.14 1.1302981548154813 0.67007816317346 0.2186089591101967 -0.15000000000000002 1.1249405297672623 0.6656134756332774 0.21468003407483605 -0.16 1.120118667223865 0.6615059630963095 0.21110828404268994 -0.17 1.1158325671852898 0.6577556255625562 0.2078937090137585 -0.18000000000000002 1.111903642149929 0.6545410505336247 0.20503630898804162 -0.19 1.1083318921177832 0.6513264755046932 0.20235749646393209 -0.2 1.1049387295872444 0.6486476629805837 0.1998572714414298 -0.21000000000000002 1.1019027420599201 0.6459688504564741 0.19771422142214218 -0.22 1.0990453420342032 0.6434686254339719 0.19557117140285454 -0.23 1.096545117011701 0.6413255754146843 0.19360670888517423 -0.24000000000000002 1.0940448919891987 0.6391825253953966 0.19164224636749386 -0.25 1.0917232544683038 0.6372180628777162 0.19003495885302812 -0.26 1.0895802044490162 0.6354321878616432 0.18842767133856242 -0.27 1.0874371544297285 0.6336463128455703 0.1868203838240967 -0.28 1.0856512794136555 0.6320390253311045 0.18539168381123824 -0.29000000000000004 1.0836868168959752 0.6304317378166387 0.18396298379837983 -0.3 1.0820795293815095 0.6290030378037803 0.18271287128712868 -0.31 1.0804722418670438 0.6275743377909219 0.18146275877587756 -0.32 1.0788649543525781 0.6261456377780634 0.18021264626462646 -0.33 1.0774362543397196 0.6248955252668124 0.17914112125498263 -0.34 1.0760075543268612 0.6238240002571684 0.17806959624533877 -0.35000000000000003 1.0745788543140027 0.6225738877459174 0.1771766587373023 -0.36000000000000004 1.0733287418027515 0.6215023627362736 0.17610513372765846 -0.37 1.0720786292915006 0.6204308377266298 0.17521219621962195 -0.38 1.0710071042818565 0.6195379002185932 0.1743192587115854 -0.39 1.0697569917706056 0.6184663752089493 0.17342632120354892 -0.4 1.0686854667609618 0.6175734377009129 0.17253338369551238 -0.41000000000000003 1.0677925292529251 0.6166805001928763 0.1718190336890832 -0.42000000000000004 1.0667210042432813 0.6157875626848399 0.17110468368265397 -0.43 1.0658280667352449 0.6150732126784106 0.17039033367622475 -0.44 1.064756541725601 0.6141802751703741 0.16967598366979555 -0.45 1.0638636042175647 0.6134659251639449 0.16896163366336633 -0.46 1.062970666709528 0.6127515751575157 0.1682472836569371 -0.47000000000000003 1.0622563167030987 0.6120372251510864 0.16771152115211518 -0.48000000000000004 1.0613633791950623 0.6113228751446573 0.16699717114568596 -0.49 1.060649029188633 0.610608525138228 0.16646140864086406 -0.5 1.0599346791822037 0.6098941751317988 0.16574705863443487 -0.51 1.0592203291757747 0.609358412626977 0.16521129612961297 -0.52 1.0585059791693454 0.608822650122155 0.164675533624791 -0.53 1.0577916291629161 0.6081083001157258 0.1641397711199691 -0.54 1.057077279156487 0.6075725376109038 0.1636040086151472 -0.55 1.0563629291500578 0.607036775106082 0.1632468336119326 -0.56 1.055827166645236 0.6065010126012601 0.1627110711071107 -0.5700000000000001 1.0551128166388066 0.6059652500964381 0.1621753086022888 -0.5800000000000001 1.0545770541339847 0.6054294875916162 0.16181813359907418 -0.59 1.0540412916291628 0.6048937250867944 0.16128237109425228 -0.6 1.053505529124341 0.6045365500835798 0.16092519609103764 -0.61 1.052969766619519 0.6040007875787579 0.16038943358621574 -0.62 1.0524340041146971 0.6034650250739358 0.16003225858300113 -0.63 1.0518982416098752 0.6031078500707212 0.15967508357978652 -0.64 1.0513624791050533 0.6027506750675066 0.1593179085765719 -0.65 1.0508267166002312 0.6022149125626848 0.15896073357335733 -0.66 1.0502909540954095 0.6018577375594701 0.15842497106853543 -0.67 1.0499337790921948 0.6015005625562555 0.1580677960653208 -0.68 1.0493980165873729 0.6009648000514336 0.1577106210621062 -0.6900000000000001 1.0490408415841583 0.600607625048219 0.1573534460588916 +0.01 1.6051623215893016 1.0638636042175647 0.5372090619776263 +0.02 1.4085374823196606 0.9027776777677766 0.41023334833483344 +0.03 1.3237084190561912 0.8324142021344991 0.35362111032531823 +0.04 1.274061093609361 0.7909819017616047 0.3196894850199306 +0.05 1.240486643307188 0.7629436640092581 0.2966516973125884 +0.060000000000000005 1.2161987430885948 0.7425846888260254 0.2796858846598945 +0.06999999999999999 1.1974470554198278 0.7266904011829753 0.2664704095409541 +0.08 1.1824457052848143 0.7141892760704641 0.2557551594445159 +0.09 1.1701231676739103 0.7036526134756331 0.24700437186575797 +0.09999999999999999 1.1597650925806866 0.6949018258968753 0.23968228429985852 +0.11 1.1510143050019288 0.687579738330976 0.23325313424199562 +0.12 1.1433350424328148 0.6809720007715055 0.2277169216921692 +0.13 1.1367273048733444 0.6752572007200719 0.222895059148772 +0.14 1.130655329818696 0.6702567506750674 0.2186089591101967 +0.15000000000000002 1.1254762922720842 0.6657920631348848 0.21468003407483605 +0.16 1.1206544297286871 0.6616845505979169 0.21110828404268994 +0.17 1.1163683296901117 0.6581128005657708 0.2078937090137585 +0.18000000000000002 1.112439404654751 0.654719638035232 0.20503630898804162 +0.19 1.1086890671209977 0.6516836505079079 0.20235749646393209 +0.2 1.1054744920920663 0.648826250482191 0.1998572714414298 +0.21000000000000002 1.102438504564742 0.6461474379580814 0.19771422142214218 +0.22 1.0995811045390254 0.6436472129355791 0.19557117140285454 +0.23 1.0969022920149156 0.6415041629162915 0.19360670888517423 +0.24000000000000002 1.0944020669924135 0.6393611128970039 0.19164224636749386 +0.25 1.0920804294715185 0.6373966503793236 0.19003495885302812 +0.26 1.089937379452231 0.6356107753632505 0.18842767133856242 +0.27 1.0877943294329433 0.6338249003471775 0.1868203838240967 +0.28 1.0860084544168702 0.6322176128327117 0.18539168381123824 +0.29000000000000004 1.0840439918991898 0.630610325318246 0.18396298379837983 +0.3 1.082436704384724 0.6291816253053877 0.18271287128712868 +0.31 1.0808294168702584 0.6277529252925291 0.18146275877587756 +0.32 1.0792221293557926 0.6263242252796708 0.18021264626462646 +0.33 1.077793429342934 0.6250741127684197 0.17914112125498263 +0.34 1.0763647293300758 0.6238240002571684 0.17806959624533877 +0.35000000000000003 1.0749360293172174 0.6227524752475248 0.1771766587373023 +0.36000000000000004 1.0736859168059663 0.6216809502378808 0.17610513372765846 +0.37 1.072435804294715 0.6206094252282369 0.17521219621962195 +0.38 1.071185691783464 0.6195379002185932 0.1743192587115854 +0.39 1.07011416677382 0.6186449627105567 0.17342632120354892 +0.4 1.0690426417641763 0.6177520252025201 0.17253338369551238 +0.41000000000000003 1.0679711167545325 0.6168590876944836 0.1718190336890832 +0.42000000000000004 1.067078179246496 0.6159661501864472 0.17110468368265397 +0.43 1.0660066542368523 0.6150732126784106 0.17039033367622475 +0.44 1.0651137167288156 0.6143588626719814 0.16967598366979555 +0.45 1.0642207792207792 0.6136445126655522 0.16896163366336633 +0.46 1.0633278417127425 0.6127515751575157 0.1682472836569371 +0.47000000000000003 1.062434904204706 0.6120372251510864 0.16771152115211518 +0.48000000000000004 1.0617205541982768 0.6115014626462646 0.16699717114568596 +0.49 1.0608276166902404 0.6107871126398353 0.16646140864086406 +0.5 1.0601132666838111 0.6100727626334062 0.16574705863443487 +0.51 1.059398916677382 0.6095370001285841 0.16521129612961297 +0.52 1.0586845666709528 0.608822650122155 0.164675533624791 +0.53 1.0579702166645235 0.6082868876173331 0.1641397711199691 +0.54 1.0572558666580942 0.6077511251125112 0.1636040086151472 +0.55 1.0567201041532723 0.6072153626076892 0.1632468336119326 +0.56 1.056005754146843 0.6066796001028674 0.1627110711071107 +0.5700000000000001 1.0554699916420212 0.6061438375980455 0.1621753086022888 +0.5800000000000001 1.054755641635592 0.6056080750932235 0.16181813359907418 +0.59 1.0542198791307702 0.6050723125884016 0.16128237109425228 +0.6 1.0536841166259483 0.6045365500835798 0.16092519609103764 +0.61 1.0531483541211262 0.6041793750803651 0.16038943358621574 +0.62 1.0526125916163045 0.6036436125755432 0.16003225858300113 +0.63 1.0520768291114826 0.6032864375723286 0.15967508357978652 +0.64 1.0515410666066605 0.6027506750675066 0.1593179085765719 +0.65 1.0510053041018386 0.6023935000642922 0.15896073357335733 +0.66 1.050648129098624 0.6018577375594701 0.15842497106853543 +0.67 1.0501123665938021 0.6015005625562555 0.1580677960653208 +0.68 1.0495766040889802 0.6011433875530409 0.1577106210621062 +0.6900000000000001 1.0492194290857657 0.6007862125498263 0.1573534460588916 diff --git a/model_extension/past_1comp_lammps/example_E2at0.3M.txt b/model_extension/past_1comp_lammps/example_E2at0.3M.txt new file mode 100644 index 0000000..52acfbc --- /dev/null +++ b/model_extension/past_1comp_lammps/example_E2at0.3M.txt @@ -0,0 +1,6 @@ +For E2 Q=-1500e, q=45e +c=0.3 M + +NP charge = -2.2916314522613133e+23 + +linker charge = 2666.7593311755268 \ No newline at end of file diff --git a/model_extension/past_1comp_lammps/examplescript_E2at0.3M.txt b/model_extension/past_1comp_lammps/examplescript_E2at0.3M.txt new file mode 100644 index 0000000..c816fe5 --- /dev/null +++ b/model_extension/past_1comp_lammps/examplescript_E2at0.3M.txt @@ -0,0 +1,84 @@ + +# 3D simulation of virus macroassembly + +units lj +boundary p p p +atom_style hybrid charge sphere +neighbor 0.3 bin +neigh_modify every 1 delay 0 check yes +## Create Simulation Box, Atoms ## +#read_data filename +read_data initCoords1comp.assembly + +## Group Atoms by Type ## +group virus type 1 +group dend type 2 + +## Defining Particle/Medium Properties ## +mass 1 1 +mass 2 0.0029024 # relative mass of dendrimer to P22 +dielectric 78.54 + +set type 1 charge -2.2916314522613133e+23 # qV_DLVO (in LJ units) + +set type 2 charge 2666.7593311755268 # qD_DLVO (in LJ units) + +## Ascribing Initial Velocities ## +velocity all create 1. 4928459 rot yes dist gaussian units box # 1-kB*T,random seed,zero net ang.mom.,gauss from MB stats + +## Ascribing interparticle potentials: ## + + +pair_style hybrid/overlay lj/expand 1.122462048309373 coul/debye 100.82960496326737 1.0756503793236465 # LJ_cut without delta, kappa, Global ES_cut + +pair_coeff 1 1 lj/expand 1 1. 0 1.122462048309373 # epsilon, sigma_hc, delta_V-V, rcut_VV=2^(1/6) D/D +pair_coeff 1 1 coul/debye 1.0756503793236465 # V-V ES_cut + +pair_coeff 1 2 lj/expand 1 0.08482142857142858 0.47500000000000003 0.09520883445481289 # epsilon, sigma_hc, delta_V-D +pair_coeff 1 2 coul/debye 0.6257884627748488 # V-D ES_cut + + +pair_coeff 2 2 lj/expand 1 0.11964285714285713 0. 0.13429456649415714 # epsilon, sigma_dd=6.7nm/56nm, delta_D-D, delta_d-d, rcut_VV=2^(1/6) d/D +pair_coeff 2 2 coul/debye 0.18271287128712868 # D-D ES_cut +pair_modify shift yes # the additive e_LJ for repulsion-only + + +## Ensemble Fixes (+ for output) ## +variable myTStep equal 0.000025 +timestep ${myTStep} +variable myDStep equal 1000 +fix ens all nvt temp 1. 1. 0.0025 # T_start, T_stop, T_damp=100*timestep + +## Define Computes for Output ## + +# compute VirusPEperatom virus reduce ave c_virusPotVec +# compute VirusKEperatom virus reduce ave c_virusKeVec +# compute DendPEperatom dend reduce ave c_dendPotVec +# compute DendKEperatom dend reduce ave c_dendKeVec + + +#print "OUTPUT COLUMNS: SIMULATION STEP NUMBER | TEMPERATURE | NP POTENTIAL ENERGY | SYSTEM VOLUME" + +#restart 500000 outfiles/assemblyRestart.* # creates 5 restart files up to equilibration; can comment this +#run 1500000 #run for 2.5 million without dumping anything + +## Defining Output Information ## +dump allV all custom ${myDStep} outfiles/dump_all.melt id type x y z # c_atomPot c_atomKin +dump posD virus custom ${myDStep} outfiles/dump_V.melt id type x y z # c_atomPot c_atomKin + + +#thermo_style custom step temp c_myVirusT c_myDendT c_myVirusPot c_myDendPot etotal ke pe vol #press +thermo_style custom step etotal pe ke +thermo_modify norm no +thermo 1000 + +restart 500000 outfiles/assemblyRestart.* # creates restart files post equilibration; keep this +run 1000000 + +unfix ens +undump posD +undump allV +#undump vOnlyD + + + \ No newline at end of file diff --git a/model_extension/past_1comp_lammps/write_script_singlesNov13.py b/model_extension/past_1comp_lammps/write_script_singlesNov13.py new file mode 100644 index 0000000..e54b2a1 --- /dev/null +++ b/model_extension/past_1comp_lammps/write_script_singlesNov13.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon Oct 24 13:51:15 2022 + +@author: cfaccini +writes lammps script for specific Qv, qd, sigmahc and c +""" +import numpy as np +import math +# import get_values +# import get_cutoffs +import os +from pathlib import Path +from matplotlib import pyplot as plt + +#===================================================== + +# Qv = input('input VLP charge in e: ') +# Qv = float(Qv) +# qd = input('input dendrimer charge in e (default is 45): ') +# qd = float(qd) + +Qv = -2085 +qd = 45 + +D = 56 # in nm. NP diameter +dd = 6.7 # in nm. dendrimer diameter +lb = 0.714 # bjerrum lenth in water, room temp. + +# c = input('input salt concentration in Molars: ') +# c = float(c) +c = 0.53 +kappa = np.sqrt(8 * np.pi * lb * 0.602*c) + +#calculate values in LJ units for LAMMPS: +# NPcharge = (Qv * (np.exp((1.64399 * D) * np.sqrt(c)) / (1 + ((1.64399 * D) * np.sqrt(c))))) * (1.60217663 * 1e-19) / (1.6011 * 1e-19) +# dendcharge = (qd * (np.exp((1.64399 * dd) * np.sqrt(c)) / (1 + ((1.64399 * dd) * np.sqrt(c))))) * (1.60217663 * 1e-19) / (1.6011 * 1e-19) + +NPcharge = (Qv * np.exp(D/2 * np.sqrt(8*np.pi*lb*0.6022*c)) / (1+((D/2 * np.sqrt(8*np.pi*lb*0.6022*c))))) * ((1.6021 * 1e-19) / (1.6011 * 1e-19)) +dendcharge = (qd * np.exp(dd/2 * np.sqrt(8*np.pi*lb*0.6022*c)) / (1+((dd/2 * np.sqrt(8*np.pi*lb*0.6022*c))))) * ((1.6021 * 1e-19) / (1.6011 * 1e-19)) + + +userInputSalt = D * np.sqrt(8*np.pi*lb*0.6022*c) #in reduced units + +# sigmahc = input('input sigma_hc value in nm (default is 4.5): ') +# sigmahc = float(sigmahc) +sigmahc = 5.15 + +sigmahc_ru = sigmahc/D #sigma_hc in reduced units + +rmaxlj = sigmahc*(2**(1/6)) #lj cutoff without delta +rmax_ru = rmaxlj/D + +rcut_VV = (2**(1/6)) #because sigma=D/D in this case +rcut_dd = (2**(1/6))*(dd/D) #because sigma=DD/DD in this case + +#===================================================== + +def yukawa(r, q1, q2, kappa, d1, d2): + lb = 0.714 #Bjerrum length, in nm + aux1 = (q1/(1+kappa*(d1/2)))*np.exp(kappa*(d1/2)) + aux2 = (q2/(1+kappa*(d2/2)))*np.exp(kappa*(d2/2)) + ue = (1/r)*aux1*aux2*lb*np.exp(-kappa*r) + + return ue + +#lj1 is the modified LJ potential: + +def lj1(r, sigmahc, d1, d2): + rmaxlj = sigmahc*(2**(1/6)) #lj cutoff without delta + delta = (d1+d2)/2 - sigmahc + rcut = rmaxlj + delta + + aux = sigmahc/(r - delta) + ulj = 1+ 4*(pow(aux, 12) - pow(aux, 6)) + # ulj = 4*(pow(aux, 12) - pow(aux, 6)) + ulj[rrcut] = 0. + + uljcut = ulj[r==rcut] + + return ulj, rcut, uljcut + +#lj2 is the unmodified LJ potential: + +def lj2(r, d1, d2): + sigma = (d1+d2)/2 + rmaxlj = sigma*(2**(1/6)) #lj cutoff without delta + rcut = rmaxlj + + aux = sigma/r + ulj = 1 + 4*(pow(aux, 12) - pow(aux, 6)) + # ulj = 4*(pow(aux, 12) - pow(aux, 6)) + # ulj[rrcut] = 0. + + uljcut = ulj[r==rcut] + + return ulj, rcut, uljcut + + +r = np.linspace(0.001, 100, 10000) #r is in nanometers + +#calculate Yukawa potentials: +ue11 = yukawa(r, Qv, Qv, kappa, D, D) #V-V +ue12 = yukawa(r, Qv, qd, kappa, D, dd) #V-d +ue22 = yukawa(r, qd, qd, kappa, dd, dd) #d-d + +val11 = np.where(ue11 < 0.005) +index11 = val11[0] +re11 = r[index11[0]] +val12 = np.where(np.absolute(ue12) <= 0.005) +index12 = val12[0] +re12 = r[index12[0]] +val22 = np.where(ue22 <= 0.005) +index22 = val22[0] +re22 = r[index22[0]] + +VV_es = re11/D #ES cutoff in reduced units +Vd_es = re12/D +dd_es = re22/D + + +#calculate lj potentials: + +ulj11, rcut11, uljcut11 = lj2(r, D, D) #unmod lj for V-V +ulj12, rcut12, uljcut12 = lj1(r, sigmahc, D, dd) #modified lj for V-d +ulj22, rcut22, uljcut22 = lj2(r, dd, dd) #unmod lj for d-d + +delta11 = 0 +delta_VV = delta11/D +delta12 = (D + dd)/2 - sigmahc +delta_Vd = delta12/D +delta22 = 0 +delta_dd = delta22/D + +#calculate net potentials: +unet12 = ue12 + ulj12 + +rtouch = (D + dd)/2 +saltconc=1000*c + +# plt.figure() +# plt.rcParams.update({'font.size': 20}) +# plt.title('Net potential between VLP-dend, c=%i mM'%saltconc) +# plt.xlabel('r ($nm$)') +# plt.ylabel('$u_{net}$ ($k_B$T)') +# plt.xlim(30, 37) +# plt.ylim(-7, 5) +# plt.axhline(y = 0, color ='black', linestyle = '-', lw = 0.5) +# plt.axhline(y = -4.5, color ='black', linestyle = '-', lw = 0.5) +# plt.axvline(x = rtouch, color ='black', linestyle = '-', lw = 0.5) +# plt.plot(r, unet12, label = 'K2: $\sigma_{hc}$=%f' %sigmahc) + +#===================================================== + +def header(): + s = ''' +# 3D simulation of virus macroassembly + +units lj +boundary p p p +atom_style hybrid charge sphere +neighbor 0.3 bin +neigh_modify every 1 delay 0 check yes ''' + return s + +def datafile(filename): + s = f''' +## Create Simulation Box, Atoms ## +#read_data {filename} +read_data initCoords1comp.assembly + +## Group Atoms by Type ## +group virus type 1 +group dend type 2 + +## Defining Particle/Medium Properties ## +mass 1 1 +mass 2 0.0029024 # relative mass of dendrimer to P22 +dielectric 78.54 + ''' + return s + +def virus_charge(npcharge): + s = f''' +set type 1 charge {npcharge} # qV_DLVO (in LJ units) +''' + return s + +def dend_charge(dendcharge): + s = f''' +set type 2 charge {dendcharge} # qD_DLVO (in LJ units) + +## Ascribing Initial Velocities ## +velocity all create 1. 4928459 rot yes dist gaussian units box # 1-kB*T,random seed,zero net ang.mom.,gauss from MB stats + +## Ascribing interparticle potentials: ## +''' + return s + +def cutoffs1(ljcut, salt, es_global): + s = f''' + +pair_style hybrid/overlay lj/expand {ljcut} coul/debye {salt} {es_global} # LJ_cut without delta, kappa, Global ES_cut + ''' + return s + +def cutoffs_VV(VV_es, rcut_VV): + s = f''' +pair_coeff 1 1 lj/expand 1 1. 0 {rcut_VV} # epsilon, sigma_hc, delta_V-V, rcut_VV=2^(1/6) D/D +pair_coeff 1 1 coul/debye {VV_es} # V-V ES_cut + ''' + return s + +def cutoffs_Vd(sigmahc, delta_Vd, Vd_es, ljcut): + s = f''' +pair_coeff 1 2 lj/expand 1 {sigmahc} {delta_Vd} {ljcut} # epsilon, sigma_hc, delta_V-D +pair_coeff 1 2 coul/debye {Vd_es} # V-D ES_cut + + ''' + return s + +def cutoffs_dd(dd_es, rcut_dd): + s = f''' +pair_coeff 2 2 lj/expand 1 0.11964285714285713 0. {rcut_dd} # epsilon, sigma_dd=6.7nm/56nm, delta_D-D, delta_d-d, rcut_VV=2^(1/6) d/D +pair_coeff 2 2 coul/debye {dd_es} # D-D ES_cut +pair_modify shift yes # the additive e_LJ for repulsion-only + ''' + return s + +def footer(): + s = ''' + +## Ensemble Fixes (+ for output) ## +variable myTStep equal 0.000025 +timestep ${myTStep} +variable myDStep equal 1000 +fix ens all nvt temp 1. 1. 0.0025 # T_start, T_stop, T_damp=100*timestep + +## Define Computes for Output ## + +# compute VirusPEperatom virus reduce ave c_virusPotVec +# compute VirusKEperatom virus reduce ave c_virusKeVec +# compute DendPEperatom dend reduce ave c_dendPotVec +# compute DendKEperatom dend reduce ave c_dendKeVec + + +#print "OUTPUT COLUMNS: SIMULATION STEP NUMBER | TEMPERATURE | NP POTENTIAL ENERGY | SYSTEM VOLUME" + +#restart 500000 outfiles/assemblyRestart.* # creates 5 restart files up to equilibration; can comment this +#run 1500000 #run for 2.5 million without dumping anything + +## Defining Output Information ## +dump allV all custom ${myDStep} outfiles/dump_all.melt id type x y z # c_atomPot c_atomKin +dump posD virus custom ${myDStep} outfiles/dump_V.melt id type x y z # c_atomPot c_atomKin + + +#thermo_style custom step temp c_myVirusT c_myDendT c_myVirusPot c_myDendPot etotal ke pe vol #press +thermo_style custom step etotal pe ke +thermo_modify norm no +thermo 1000 + +restart 500000 outfiles/assemblyRestart.* # creates restart files post equilibration; keep this +run 1000000 + +unfix ens +undump posD +undump allV +#undump vOnlyD + + + ''' + return s + +script = header() +script+=datafile('filename') #datafile with initial coordinates +script+= virus_charge(NPcharge) #VLP charge (in reduced units) +script+= dend_charge(dendcharge) #dendrimer charge (in reduced units) +#first pair is V-V: +script+= cutoffs1(rcut_VV, userInputSalt, VV_es) #ljcut without delta (in reduced units), userinputKAPPA (in reduced units), ES_global_cutoff (in reduced units) +script+= cutoffs_VV(VV_es, rcut_VV) +#next is V-d interactions: +script+= cutoffs_Vd(sigmahc_ru, delta_Vd, Vd_es, rmax_ru) #sigmahc (in reduced units), delta_Vd, Vd_es +#finally, d-d: +script+= cutoffs_dd(dd_es, rcut_dd) + +script+= footer() + +# path = r'C:\Users\cfaccini\OneDrive - Indiana University\IU\Vikram\vlp_project' +# path = os.path.join(path,str(Qv),str(sigmahc), str(c)) + +# path = Path(path) + +# if not os.path.isdir(path): +# path.mkdir(parents=True) + + + diff --git a/model_extension/table_cutoffs.py b/model_extension/table_cutoffs.py new file mode 100644 index 0000000..50e104d --- /dev/null +++ b/model_extension/table_cutoffs.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon Nov 13 17:19:17 2023 + +@author: cfaccini +""" + +import numpy as np +import math +from matplotlib import pyplot as plt + + +def yukawa(r, q1, q2, kappa, d1, d2): + lb = 0.714 #Bjerrum length, in nm + aux1 = (q1/(1+kappa*(d1/2)))*np.exp(kappa*(d1/2)) + aux2 = (q2/(1+kappa*(d2/2)))*np.exp(kappa*(d2/2)) + ue = (1/r)*aux1*aux2*lb*np.exp(-kappa*r) + val = np.where(np.absolute(ue) <= 0.005) + index = val[0] + re = r[index[0]] + ue[r>re] = 0. + return ue + +r = np.linspace(0.001, 100, 10000) + +qd = 45 #dendrimer charge, units of e +Qv = -2122 #VLP charge, units of e + +Dv = 56 #VLP diameter, in nm +dd = 6.7 #dendrimer diameter, in nm + +# sigmahc = 5.15 #in nm + +#============================ +# salt concentrations in MOLARS +cmin = 0.01 +cmax = 0.7 +cstep = 0.01 + +c = np.arange(cmin, cmax, cstep) +kappa = 3.287*np.sqrt(c) + +VV_es = np.zeros(len(c)) +Vd_es = np.zeros(len(c)) +dd_es = np.zeros(len(c)) + +with open('cutoffs.txt', 'w') as file: + for i in range(len(c)): + salt = c[i] + kappa1 = kappa[i] + ue_VV = yukawa(r, Qv, Qv, kappa1, Dv, Dv) + ue_Vd = yukawa(r, Qv, qd, kappa1, Dv, dd) + ue_dd = yukawa(r, qd, qd, kappa1, dd, dd) + + val11 = np.where(ue_VV < 0.005) + index11 = val11[0] + re11 = r[index11[0]] + val12 = np.where(np.absolute(ue_Vd) <= 0.005) + index12 = val12[0] + re12 = r[index12[0]] + val22 = np.where(ue_dd <= 0.005) + index22 = val22[0] + re22 = r[index22[0]] + + VV_es[i] = re11/Dv + Vd_es[i] = re12/Dv + dd_es[i] = re22/Dv + + file.write(f'{salt} {re11/Dv} {re12/Dv} {re22/Dv}\n') + +file.close() \ No newline at end of file