forgot to include updated scripts
Browse files- pdbbind.py +5 -1
- pdbbind_complexes.py +1 -1
pdbbind.py
CHANGED
@@ -111,9 +111,13 @@ def parse_complex(fn):
|
|
111 |
# parse ligand, convert to SMILES and map atoms
|
112 |
suppl = Chem.SDMolSupplier(fn+'/'+name+'_ligand.sdf')
|
113 |
mol = next(suppl)
|
114 |
-
|
|
|
|
|
|
|
115 |
|
116 |
# position of atoms in SMILES (not counting punctuation)
|
|
|
117 |
atom_order = [int(s) for s in list(filter(None,re.sub(r'[\[\]]','',mol.GetProp("_smilesAtomOutputOrder")).split(',')))]
|
118 |
|
119 |
# tokenize the SMILES
|
|
|
111 |
# parse ligand, convert to SMILES and map atoms
|
112 |
suppl = Chem.SDMolSupplier(fn+'/'+name+'_ligand.sdf')
|
113 |
mol = next(suppl)
|
114 |
+
|
115 |
+
# bring molecule atoms in canonical order (to determine local frames uniquely)
|
116 |
+
m_neworder = tuple(zip(*sorted([(j, i) for i, j in enumerate(Chem.CanonicalRankAtoms(mol))])))[1]
|
117 |
+
mol = Chem.RenumberAtoms(mol, m_neworder)
|
118 |
|
119 |
# position of atoms in SMILES (not counting punctuation)
|
120 |
+
smi = Chem.MolToSmiles(mol)
|
121 |
atom_order = [int(s) for s in list(filter(None,re.sub(r'[\[\]]','',mol.GetProp("_smilesAtomOutputOrder")).split(',')))]
|
122 |
|
123 |
# tokenize the SMILES
|
pdbbind_complexes.py
CHANGED
@@ -57,7 +57,7 @@ _URLs = {name: _URL+_file_names[name] for name in _file_names}
|
|
57 |
class PDBBindComplexes(datasets.ArrowBasedBuilder):
|
58 |
"""List of protein sequences, ligand SMILES, and complex coordinates."""
|
59 |
|
60 |
-
VERSION = datasets.Version("1.
|
61 |
|
62 |
def _info(self):
|
63 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|
|
|
57 |
class PDBBindComplexes(datasets.ArrowBasedBuilder):
|
58 |
"""List of protein sequences, ligand SMILES, and complex coordinates."""
|
59 |
|
60 |
+
VERSION = datasets.Version("1.4.0")
|
61 |
|
62 |
def _info(self):
|
63 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|