EricBoi commited on
Commit
684fecf
·
1 Parent(s): 136d978
Files changed (2) hide show
  1. app.py +23 -2
  2. requirements.txt +1 -0
app.py CHANGED
@@ -13,9 +13,30 @@ import optax
13
  import pandas as pd
14
  from dcmnet.modules import MessagePassingModel
15
 
 
 
 
 
 
 
16
  test_weights = pd.read_pickle("wbs/best_0.0_params.pkl")
17
 
 
 
 
 
 
 
 
 
 
 
18
 
 
 
 
 
 
19
 
20
 
21
  # Disable future warnings.
@@ -30,8 +51,8 @@ rotation = e3x.so3.random_rotation(rotation_key)
30
 
31
  st.write(rotation)
32
 
33
- st.write(MessagePassingModel)
34
- st.write(test_weights)
35
 
36
 
37
  x = st.slider('Select a value')
 
13
  import pandas as pd
14
  from dcmnet.modules import MessagePassingModel
15
 
16
+ from rdkit import Chem
17
+ from rdkit.Chem import AllChem
18
+
19
+ from dcmnet.psi4_ import *
20
+
21
+
22
  test_weights = pd.read_pickle("wbs/best_0.0_params.pkl")
23
 
24
+ smiles = 'CCNCC'
25
+ # smiles = 'CC(CC1=CC=CC=C1)NC'
26
+
27
+ smiles_mol = Chem.MolFromSmiles(smiles)
28
+ rdkit_mol = Chem.AddHs(smiles_mol)
29
+ elements = [a.GetSymbol() for a in rdkit_mol.GetAtoms()]
30
+ # Generate a conformation
31
+ AllChem.EmbedMolecule(rdkit_mol)
32
+ coordinates = rdkit_mol.GetConformer(0).GetPositions()
33
+ surface = get_grid_points(coordinates)
34
 
35
+ for i, atom in enumerate(smiles_mol.GetAtoms()):
36
+ # For each atom, set the property "molAtomMapNumber" to a custom number, let's say, the index of the atom in the molecule
37
+ atom.SetProp("atomNote", str(atom.GetIdx()))
38
+ # display molecule
39
+ st.image(smiles_mol)
40
 
41
 
42
  # Disable future warnings.
 
51
 
52
  st.write(rotation)
53
 
54
+ #st.write(MessagePassingModel)
55
+ #st.write(test_weights)
56
 
57
 
58
  x = st.slider('Select a value')
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  e3x
 
2
  dcmnet @ git+https://github.com/EricBoittier/jaxeq@main
 
1
  e3x
2
+ rdkit
3
  dcmnet @ git+https://github.com/EricBoittier/jaxeq@main