[Swift-commit] r5875 - in SwiftApps/CMTS/rmsd: . conf input_files

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Fri Jul 27 16:17:57 CDT 2012


Author: davidk
Date: 2012-07-27 16:17:57 -0500 (Fri, 27 Jul 2012)
New Revision: 5875

Added:
   SwiftApps/CMTS/rmsd/plot_pd.pl
Modified:
   SwiftApps/CMTS/rmsd/conf/grotthuss-ssh.cf
   SwiftApps/CMTS/rmsd/conf/grotthuss.cf
   SwiftApps/CMTS/rmsd/conf/makena-ssh.cf
   SwiftApps/CMTS/rmsd/conf/makena.cf
   SwiftApps/CMTS/rmsd/input_files/rmsd.temp.tcl
   SwiftApps/CMTS/rmsd/rmsd.sh
   SwiftApps/CMTS/rmsd/rmsd.swift
Log:
Post-processing plot


Modified: SwiftApps/CMTS/rmsd/conf/grotthuss-ssh.cf
===================================================================
--- SwiftApps/CMTS/rmsd/conf/grotthuss-ssh.cf	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/conf/grotthuss-ssh.cf	2012-07-27 21:17:57 UTC (rev 5875)
@@ -8,3 +8,4 @@
 tcp.port.range=5000,51000
 
 #app rmsd=$PWD/../rmsd.sh
+#app plot_pd=$PWD/../plot_pd.pl

Modified: SwiftApps/CMTS/rmsd/conf/grotthuss.cf
===================================================================
--- SwiftApps/CMTS/rmsd/conf/grotthuss.cf	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/conf/grotthuss.cf	2012-07-27 21:17:57 UTC (rev 5875)
@@ -8,3 +8,4 @@
 use.wrapper.staging=false
 
 #app rmsd=$PWD/../rmsd.sh
+#app plot_pd=$PWD/../plot_pd.pl

Modified: SwiftApps/CMTS/rmsd/conf/makena-ssh.cf
===================================================================
--- SwiftApps/CMTS/rmsd/conf/makena-ssh.cf	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/conf/makena-ssh.cf	2012-07-27 21:17:57 UTC (rev 5875)
@@ -8,5 +8,4 @@
 tcp.port.range=5000,51000
 
 #app rmsd=$PWD/../rmsd.sh
-#app cat=/bin/cat
-#app sleep=/bin/sleep
+#app plot_pd=$PWD/../plot_pd.pl

Modified: SwiftApps/CMTS/rmsd/conf/makena.cf
===================================================================
--- SwiftApps/CMTS/rmsd/conf/makena.cf	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/conf/makena.cf	2012-07-27 21:17:57 UTC (rev 5875)
@@ -8,3 +8,4 @@
 use.wrapper.staging=false
 
 #app rmsd=$PWD/../rmsd.sh
+#app plot_pd=$PWD/../plot_pd.pl

Modified: SwiftApps/CMTS/rmsd/input_files/rmsd.temp.tcl
===================================================================
--- SwiftApps/CMTS/rmsd/input_files/rmsd.temp.tcl	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/input_files/rmsd.temp.tcl	2012-07-27 21:17:57 UTC (rev 5875)
@@ -16,7 +16,7 @@
 
 set psf cg_clath_cage.psf
 set pdb cg_clath_cage.pdb
-set dcd cg_clath_cage.BLAB1_BLAB2.dcd
+set dcd cg_clath_cage.dcd
 
 # Load input files
 mol load psf $psf
@@ -32,7 +32,7 @@
 puts "number of frames $nmfrm"
 
 # open rmsd file
-set frmsd [open rmsd.BLAB1_BLAB2.dat w]
+set frmsd [open rmsd.dat w]
 
 # Select atoms
 set ref [atomselect top $seltext frame 0] 

Added: SwiftApps/CMTS/rmsd/plot_pd.pl
===================================================================
--- SwiftApps/CMTS/rmsd/plot_pd.pl	                        (rev 0)
+++ SwiftApps/CMTS/rmsd/plot_pd.pl	2012-07-27 21:17:57 UTC (rev 5875)
@@ -0,0 +1,70 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+# This code will run many short simulations in order to 
+# sweep the nonbonded parameter space
+
+# File names
+open (OFILE, ">", "rmsd_pd.dat");
+
+# Bead names
+my $b1name = "PX";
+my $b2name = "DT";
+
+# Bead ranges
+my $b1min=0.0;
+my $b1max=10.0;
+
+my $b2min=0.0;
+my $b2max=10.0;
+
+my $del=0.50;
+
+# Set large number to find RMSD min
+my $rmsdmin = 123456789.0;
+my $b1rmsdmin=0.0;
+my $b2rmsdmin=0.0;
+
+my $b1=$b1min;
+
+while ($b1<=$b1max) 
+{
+	my $b2=$b2min;
+
+	while ($b2<=$b2max)
+	{
+		if (-s "rmsd.$b1name${b1}_$b2name${b2}.dat")
+		{	
+			open(INPUT, "<", "rmsd.$b1name${b1}_$b2name${b2}.dat");
+			$_ = <INPUT>;
+
+			my @data = split(/ +/,$_);
+        		my $rmsd=$data[2]*1.0;
+			
+			# Find Minimum
+			if ($rmsd<$rmsdmin)
+			{
+				$rmsdmin=$rmsd;
+				$b1rmsdmin=$b1;
+				$b2rmsdmin=$b2;
+			}
+	
+			print OFILE "$b1 $b2 $rmsd\n";			
+			close(INPUT);
+		}		
+
+		$b2 = $b2+$del;
+	
+	}
+
+	print OFILE " \n";
+	$b1 = $b1+$del;
+
+}
+
+close(OFILE);
+
+print "Minimum Values\n";
+print "RMSD = $rmsdmin, eps_$b1name = $b1rmsdmin, eps_$b2name = $b2rmsdmin\n" ; 


Property changes on: SwiftApps/CMTS/rmsd/plot_pd.pl
___________________________________________________________________
Added: svn:executable
   + *

Modified: SwiftApps/CMTS/rmsd/rmsd.sh
===================================================================
--- SwiftApps/CMTS/rmsd/rmsd.sh	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/rmsd.sh	2012-07-27 21:17:57 UTC (rev 5875)
@@ -12,6 +12,9 @@
 sed -i -e s/HBEPS/-0.01/g -e s/PXEPS/-$b1/g -e s/DTEPS/-$b2/g -e s/AKEPS/-0.01/g -e s/LTEPS/-0.01/g $namd_parameters
 sed -i -e s/BLAB1/$b1name$b1/g -e s/BLAB2/$b2name$b2/g -e s/B1/$b1/ -e s/B2/$b2/ $vmd_script
 
-mpiexec -machinefile $PBS_NODEFILE /Network/Servers/vothfile.uchicago.edu/home/davidk/namd_2.8-intel-openmpi/namd2 $namd_input 
-#vmd -dispdev text -e $vmd_script 
+namd2=$( which namd2 )
+mpiexec -machinefile $PBS_NODEFILE $namd2 $namd_input 
+vmd -dispdev text -e $vmd_script 
+
 mv output/cg_clath_cage.dcd output/cg_clath_cage-$b1-$b2.dcd
+mv rmsd.dat output/rmsd.$b1name${b1}_$b2name${b2}.dat

Modified: SwiftApps/CMTS/rmsd/rmsd.swift
===================================================================
--- SwiftApps/CMTS/rmsd/rmsd.swift	2012-07-27 17:42:59 UTC (rev 5874)
+++ SwiftApps/CMTS/rmsd/rmsd.swift	2012-07-27 21:17:57 UTC (rev 5875)
@@ -1,19 +1,24 @@
 type file;
 
-app (file o, file e, file d) rmsd (float b1_val, float b2_val, string b1_name, string b2_name, file namd_input_file, file namd_params_file, file vmd_script_file, file psf_file, file pdb_file)
+app (file o, file e, file dcdf, file datf) rmsd (float b1_val, float b2_val, string b1_name, string b2_name, file namd_input_file, file namd_params_file, file vmd_script_file, file psf_file, file pdb_file)
 {
   rmsd b1_val b2_val b1_name b2_name @namd_input_file @namd_params_file @vmd_script_file stdout=@o stderr=@e;
 }
 
+app (file plot_pd_f) plot_pd ()
+{
+   plot_pd stdout=@plot_pd_f;
+}
+
 # Bead names
 string b1name = "PX";
 string b2name = "DT";
 
 # Bead ranges
 float b1min=0.0;
-float b1max=2.0;
+float b1max=1.0;
 float b2min=0.0;
-float b2max=2.0;
+float b2max=1.0;
 
 # Delta
 float delta=0.5;
@@ -30,7 +35,12 @@
       file output <single_file_mapper; file=@strcat("logs/namd-", b1, "-", b2, ".out.txt")>;
       file error <single_file_mapper; file=@strcat("logs/namd-", b1, "-", b2, ".err.txt")>;
       file dcd <single_file_mapper; file=@strcat("output/cg_clath_cage-", b1, "-", b2, ".dcd")>;
-      (output, error, dcd) = rmsd(b1, b2, b1name, b2name, namd_input, namd_params, vmd_script, psf, pdb);
+      file dat <single_file_mapper; file=@strcat("output/rmsd.", b1name, b1, "_", b2name, b2, ".dat")>;
+      (output, error, dcd, dat) = rmsd(b1, b2, b1name, b2name, namd_input, namd_params, vmd_script, psf, pdb);
    }
 }
 
+# Post processing analysis
+file plot_pd_file <"output/plot_pd.txt">;
+plot_pd_file = plot_pd();
+




More information about the Swift-commit mailing list