Robert Elder commited on
Commit ·
a3c0189
1
Parent(s): 1e03bc7
fixing ceramics logic (again)
Browse files- color2_module/colors.py +5 -1
- color3_module/colors.py +5 -2
- exposure2_module/exposure.py +5 -1
- exposure3_module/exposure.py +5 -2
color2_module/colors.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from flask import Flask, render_template, request
|
| 2 |
import numpy as np
|
| 3 |
from functions import SigFigs, Piringer, WilkeChang, SheetRelease, SheetRates, RatePlot
|
|
@@ -129,7 +130,10 @@ def app_post():
|
|
| 129 |
return render_template('chemError.html')
|
| 130 |
|
| 131 |
# metals/ceramics logic
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
| 133 |
#ceramic = False
|
| 134 |
#mol = Chem.MolFromSmiles(smiles)
|
| 135 |
#mol = Chem.AddHs(mol)
|
|
|
|
| 1 |
+
import numbers
|
| 2 |
from flask import Flask, render_template, request
|
| 3 |
import numpy as np
|
| 4 |
from functions import SigFigs, Piringer, WilkeChang, SheetRelease, SheetRates, RatePlot
|
|
|
|
| 130 |
return render_template('chemError.html')
|
| 131 |
|
| 132 |
# metals/ceramics logic
|
| 133 |
+
if isinstance(mp, numbers.Number):
|
| 134 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,mp)
|
| 135 |
+
else:
|
| 136 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,100)
|
| 137 |
#ceramic = False
|
| 138 |
#mol = Chem.MolFromSmiles(smiles)
|
| 139 |
#mol = Chem.AddHs(mol)
|
color3_module/colors.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import sys
|
| 2 |
from flask import Flask, render_template, request
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
|
@@ -102,7 +102,10 @@ def app_post():
|
|
| 102 |
return render_template('chemError.html')
|
| 103 |
|
| 104 |
# metals/ceramics logic
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
| 106 |
#ceramic = False
|
| 107 |
#mol = Chem.MolFromSmiles(smiles)
|
| 108 |
#atom_num_list = [a.GetAtomicNum() for a in mol.GetAtoms()]
|
|
|
|
| 1 |
+
import sys,numbers
|
| 2 |
from flask import Flask, render_template, request
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
|
|
|
| 102 |
return render_template('chemError.html')
|
| 103 |
|
| 104 |
# metals/ceramics logic
|
| 105 |
+
if isinstance(mp, numbers.Number):
|
| 106 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,mp)
|
| 107 |
+
else:
|
| 108 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,100)
|
| 109 |
#ceramic = False
|
| 110 |
#mol = Chem.MolFromSmiles(smiles)
|
| 111 |
#atom_num_list = [a.GetAtomicNum() for a in mol.GetAtoms()]
|
exposure2_module/exposure.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
from flask import render_template, request
|
| 3 |
from functions import SigFigs, Piringer, WilkeChang, SheetRelease, SheetRates, RatePlot
|
|
@@ -72,7 +73,10 @@ def exp_post():
|
|
| 72 |
mp = 'Not found'
|
| 73 |
|
| 74 |
# metals/ceramics logic
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
| 76 |
#ceramic = False
|
| 77 |
#mol = Chem.MolFromSmiles(smiles)
|
| 78 |
#atom_num_list = [a.GetAtomicNum() for a in mol.GetAtoms()]
|
|
|
|
| 1 |
+
import numbers
|
| 2 |
import numpy as np
|
| 3 |
from flask import render_template, request
|
| 4 |
from functions import SigFigs, Piringer, WilkeChang, SheetRelease, SheetRates, RatePlot
|
|
|
|
| 73 |
mp = 'Not found'
|
| 74 |
|
| 75 |
# metals/ceramics logic
|
| 76 |
+
if isinstance(mp, numbers.Number):
|
| 77 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,mp)
|
| 78 |
+
else:
|
| 79 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,100)
|
| 80 |
#ceramic = False
|
| 81 |
#mol = Chem.MolFromSmiles(smiles)
|
| 82 |
#atom_num_list = [a.GetAtomicNum() for a in mol.GetAtoms()]
|
exposure3_module/exposure.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import sys
|
| 2 |
import numpy as np
|
| 3 |
import pandas as pd
|
| 4 |
from flask import render_template, request
|
|
@@ -68,7 +68,10 @@ def exp_post():
|
|
| 68 |
mp = 'Not found'
|
| 69 |
|
| 70 |
# metals/ceramics logic
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
| 72 |
#ceramic = False
|
| 73 |
#mol = Chem.MolFromSmiles(smiles)
|
| 74 |
#atom_num_list = [a.GetAtomicNum() for a in mol.GetAtoms()]
|
|
|
|
| 1 |
+
import sys,numbers
|
| 2 |
import numpy as np
|
| 3 |
import pandas as pd
|
| 4 |
from flask import render_template, request
|
|
|
|
| 68 |
mp = 'Not found'
|
| 69 |
|
| 70 |
# metals/ceramics logic
|
| 71 |
+
if isinstance(mp, numbers.Number):
|
| 72 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,mp)
|
| 73 |
+
else:
|
| 74 |
+
is_metal, is_ceramic = CeramicOrMetal(smiles,100)
|
| 75 |
#ceramic = False
|
| 76 |
#mol = Chem.MolFromSmiles(smiles)
|
| 77 |
#atom_num_list = [a.GetAtomicNum() for a in mol.GetAtoms()]
|