Created
December 4, 2015 11:28
-
-
Save ch-hristov/770558a47b26aebff7a9 to your computer and use it in GitHub Desktop.
Revisions
-
ch-hristov renamed this gist
Dec 4, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ch-hristov created this gist
Dec 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ var engine = Python.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable("mol", new SmilesParser()); string script = "import clr\nk = mol.ParseMolecule(\"CCCCCC\")\nr = k.Count"; ScriptSource ss = engine.CreateScriptSourceFromString(script); ss.Execute(scope); var variable = scope.GetVariable("r"); MessageBox.Show(variable.ToString());