"; include ("header.php"); include ("titlebartop.html"); if (!$vipPDB) echo "Oligomer Generator"; else echo"Create an Oligomer of $vipPDB"; include ("titlebarbottom.html"); echo"
"; if (!$matrix) { echo" \n"; } echo"
Click here for Detailed Instructions

"; if (!$vipPDB && !$file) { echo"

(1) Pick a capsid from the VIPER database:

\n"; } else { $name=$file; if (!$file) { $query=mysql_query("SELECT name, virus_info.vipPDB, max(Tnum) from virus_info, layers WHERE layers.vipPDB = virus_info.vipPDB AND virus_info.vipPDB = '$vipPDB' GROUP BY virus_info.vipPDB"); $row=mysql_fetch_array($query); $name=$row["name"]; $Tnum=$row["max(Tnum)"]; } echo"\n(1) Using capsid for : $name (T=$Tnum) "; } if (!$vipPDB && !$file) echo"\n

-OR- upload your own PDB
(WARNING: coordinates must be in the VIPER convention)
"; elseif ($file) echo"\n"; if (!$matrix) echo"

(2) Would you like to generate complete/part(s) of the particle?

(If you have chosen to generate full/part of particle jump to steps (5) & (6) and click on SUBMIT)"; echo"

"; if(!$Tnum) echo"

(3) Select the T number of your virus/capsid.

(Select T=1 for pT2, pT3,
pT25, pT169 structures)

"; else echo"Lattice for T number = $Tnum "; echo "\n

\n"; if (!$matrix) echo"

(4) Select the SUBUNIT and MATRIX identifiers

(based on the numbers in the adjacent DIAGRAM e.g. C1,B6,C7,B8,C9,B5 OR simply 1, 2, 3, etc.)
  \n"; else echo"Using Matrices: $matrix \n"; echo"
"; if (!$Tnum) echo"\n\n"; else { $cage=$Tnum; if (preg_match("/pT/i", $cage)) $cage=1; if ($cage==3) echo "\n"; else echo"\n"; } echo"

"; if (!$calpha) echo"

(5) Use only the C-alpha atoms?

Yes No \n"; else echo"Use only C-alpha atoms? $calpha \n"; echo"

\n"; if (!$displayprev) echo"

(6) Display graphical preview?

Yes No \n"; else echo "Display graphical preview? $displayprev \n"; if (!$usermail) echo"

(7) Enter your e-mail address: (Mandatory)
* You will receive an e-mail describing how to access the results. We respect your privacy and will NOT share your address with any third party.*\n"; else echo"

E-mail address: $usermail "; echo"



\n"; include("EMAIL_ADDRESSES/reddyv.html"); echo""; include ("footer.html"); } // CREATE "WAIT" PAGE elseif($step == 2) { echo "
"; // check if user has selected or uploaded a virus if ($upfile2) $upfile=$upfile2; else $upfile=$_FILES['upfile']['name']; if ($upfile) echo"upfile: $upfile
\n"; if (!$PDBID && !$upfile) { echo" No input virus for oligomer generation!
Click HERE to go back and select or upload an entry.
"; exit; } elseif ($upfile){ echo"Uploading File: $upfile

\n"; move_uploaded_file ($_FILES['upfile']['tmp_name'], "./SCRATCH/" . $_FILES['upfile']['name']); } // check that if they did not choose an FXOLGMR, that they have a Tnumber & Matrices if ($FXOLGMR=='-NO-' && ($T=='-- T numbers --' || !$MATRIX)) { echo" If you are not generating a partial or full particle from the list,
make sure you have provided both a T number and the Subunit Identifiers."; exit; } // check if e-mail is address is valid if ($E_MAIL){ if (eregi ("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]+$", $E_MAIL)) { list ($userName, $mailDomain) = split("@", $E_MAIL); if (!checkdnsrr($mailDomain, "MX")) $E_MAIL=''; } else $E_MAIL=''; } if (!$E_MAIL) { echo"You did not specify a valid e-mail address.
(e.g., hello@myworld.com)

Click HERE to go back and complete the form."; exit; } else { echo"

Please wait while your oligomer is generated.
Some Oligomers may take longer than others, depending on the number of atoms in the resulting file.

"; sleep(2); echo""; } echo"

"; } ?>