30bce6638a5840e6a67f0d996c6c51b809cd5c0c,chemml/chem/molecule.py,Molecule,to_smiles,#Molecule#,421
Before Change
self._check_rdkit_molecule()
// kekulize flag
if "kekuleSmiles" in kwargs and kwargs["kekuleSmiles"]:
Chem.Kekulize(self.rdkit_molecule)
// store arguments for future reference
self._smiles = Chem.MolToSmiles(self.rdkit_molecule, **kwargs)
// arguments
self._default_smiles_args = {"isomericSmiles":True, "kekuleSmiles":False, "rootedAtAtom":-1, "canonical":True, "allBondsExplicit":False,
After Change
// molecule must exist
engine = self._check_original_molecule()
if engine == "pybel":
smiles = self.pybel_molecule.write("smi").strip().split("\t")[0]
self._load_rdkit(smiles, "smiles", from_load=False)
self.to_smiles()
else:
self._to_smiles_rdkit(**kwargs)
def _to_smiles_rdkit(self, **kwargs):
This internal function creates and stores the SMILES string for rdkit molecule.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: hachmannlab/chemml
Commit Name: 30bce6638a5840e6a67f0d996c6c51b809cd5c0c
Time: 2019-03-05
Author: mojtabah@buffalo.edu
File Name: chemml/chem/molecule.py
Class Name: Molecule
Method Name: to_smiles
Project Name: zake7749/PTT-Chat-Generator
Commit Name: 75c1231f77fc1ebc5af31d5c598f1353ea9aa5df
Time: 2016-10-20
Author: zake7749@gmail.com
File Name: filter.py
Class Name: ArticleFilter
Method Name: generate_corpus
Project Name: facebookresearch/visdom
Commit Name: 1753e20f4ba805cb94d3646d472c53bc8d990a2a
Time: 2017-10-05
Author: jju@fb.com
File Name: py/server.py
Class Name: PostHandler
Method Name: post