David Saylor commited on
Commit
d47d8f8
·
1 Parent(s): 7f77ca2

added error output if Mw < 100 g/mol

Browse files
exposure_module/exposure.py CHANGED
@@ -26,6 +26,9 @@ def exp_post():
26
  if error > 0:
27
  return render_template('chemError.html')
28
 
 
 
 
29
  amount = float(request.form["amount"])
30
  mass = float(request.form["mass"])
31
  density = float(request.form["density"])
 
26
  if error > 0:
27
  return render_template('chemError.html')
28
 
29
+ if MW < 100.:
30
+ return render_template('MwError.html', MW=MW, LogP=LogP, iupac=iupac, cas=cas, smiles=smiles, molImage=molImage)
31
+
32
  amount = float(request.form["amount"])
33
  mass = float(request.form["mass"])
34
  density = float(request.form["density"])
exposure_module/templates/MwError.html ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>CHRIS-ChemError</title>
6
+ <link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='styles.css') }}">
7
+
8
+ <style>
9
+ * {
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ /* Create two equal columns that floats next to each other */
14
+ .column {
15
+ float: left;
16
+ width: 50%;
17
+ padding: 10px;
18
+ vertical-align: top;
19
+ align: center;
20
+ }
21
+
22
+ /* Clear floats after the columns */
23
+ .row:after {
24
+ content: "";
25
+ display: table;
26
+ clear: both;
27
+ }
28
+ </style>
29
+
30
+ </head>
31
+
32
+ <img src="{{ url_for('static',filename='images/FDAlogo.png') }}" style="float: left;" height="100"/>
33
+ <img src="{{ url_for('static',filename='images/FDAgraphic.png') }}" style="float: right;" height="100"/>
34
+ <br clear="all" />
35
+
36
+ <body>
37
+
38
+ <div style="font-size:5rem;text-align:center"> &#129318; </div>
39
+
40
+ <h2> Compound </h2>
41
+
42
+ <div class="container">
43
+ <div class="row">
44
+ <div class="column">
45
+ IUPAC Name :: {{iupac}} <br> <br>
46
+ CAS :: {{cas}} <br> <br>
47
+ Molecular weight :: {{MW}} <br> <br>
48
+ LogKow :: {{LogP}} <br> <br>
49
+ SMILES :: {{smiles}}
50
+ </div>
51
+ <div class="column">
52
+ <img src="{{molImage}}"/>
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <p style="font-size:2rem;text-align:center">
58
+ Unfortunately, CHRIS cannot be used for chemicals with Mw < 100 g/mol. Please return to the previous page to evaluate
59
+ a different chemical.
60
+ </p>
61
+
62
+
63
+ </body>
exposure_module/templates/exposure_index.html CHANGED
@@ -54,10 +54,12 @@ For details on how to use CHRIS, please click the information icons next to each
54
  <h4 class="modal-title">Bulk chemical</h4>
55
  </div>
56
  <div class="modal-body">
57
- <p><em>Identity</em> - Please enter the chemical name, including CAS # if known. Note that CHRIS is limited to substances
58
- with molecular weight between 100 and 1100 g/mol. For compounds with molecular weight > 1100 g/mol, this value
59
- can be used for a conservative exposure estimate.
60
- <p><em>Molecular weight</em> - Enter the molecular weight of the substance in grams per mole.</p>
 
 
61
  <p><em>Amount</em> - Enter the total mass of the substance in the component being evaluated expressed in milligrams.</p>
62
  </div>
63
  <div class="modal-footer">
 
54
  <h4 class="modal-title">Bulk chemical</h4>
55
  </div>
56
  <div class="modal-body">
57
+ <p><em>Identifier type and identifier</em> - Please select the identifier type and enter the chemical identifier.
58
+ For example, if the CAS number is known, select CAS from the pull down menu and enter the CAS number in the identifier field.
59
+ If the CAS number is unknown, CHRIS can identify the molecular structure through the SMILES code, which can
60
+ be found for many chemicals using <a href="https://pubchem.ncbi.nlm.nih.gov">PubChem</a> or generated based on
61
+ the molecular structure using tools such as <a href="https://cactus.nci.nih.gov/cgi-bin/osra/index.cgi">OSRA</a>.
62
+ Alternatively, CHRIS can attempt to identify the chemical using a common name for the chemical.</p>
63
  <p><em>Amount</em> - Enter the total mass of the substance in the component being evaluated expressed in milligrams.</p>
64
  </div>
65
  <div class="modal-footer">
functions.py CHANGED
@@ -13,7 +13,7 @@ def SigFigs(number, n):
13
 
14
  def Piringer(Mw, Ap):
15
 
16
- if Mw > 1100.:
17
  Mw = 1100.
18
  T = 310.
19
 
 
13
 
14
  def Piringer(Mw, Ap):
15
 
16
+ if Mw > 1100.: # if molecule is greater than 1100 g/mol, default to that value as worst case
17
  Mw = 1100.
18
  T = 310.
19
 
polymers.py CHANGED
@@ -12,7 +12,7 @@ def Polymers():
12
  PolyData[4] = ('Polyurethane (polyether)', 11.7)
13
  PolyData[5] = ('Polycarbonate', 2.6)
14
  PolyData[6] = ('Polyoxymethylene', 8.2)
15
- PolyData[7] = ('Poly(methyl methacrylate)', 3)
16
  PolyData[8] = ('Acrylonitrile butadiene styrene', 8.2)
17
  PolyData[9] = ('Polyether block amide', 11.7)
18
  PolyData[10] = ('Polyamide', 2.6)
 
12
  PolyData[4] = ('Polyurethane (polyether)', 11.7)
13
  PolyData[5] = ('Polycarbonate', 2.6)
14
  PolyData[6] = ('Polyoxymethylene', 8.2)
15
+ PolyData[7] = ('Poly(methyl methacrylate)', 2.6)
16
  PolyData[8] = ('Acrylonitrile butadiene styrene', 8.2)
17
  PolyData[9] = ('Polyether block amide', 11.7)
18
  PolyData[10] = ('Polyamide', 2.6)