Python Console in UnityMol X
Exhaustive list of functions
See API.md
Python integration in UnityMol X is done using IronPython. It is a powerful python integration without needing to do every bindings for a function meaning that you can call every C# and Unity class/methods (for example GameObject.Find("Main Camera").transform.position = Vector3(0.1,0.2,0.3)
).
However, not every python modules are available (eg. numpy, scipy, …).
An API is defined to perform all the actions from the UI.
To show (and hide) the console press the CTRL
+<space bar>
key combination
Some examples of commands in the APIPython
load("filePath")
fetch("1KX2")
select("1KX2 and resname CYS", "mySelection")
show("cartoon")
hide("hb")
showSelection("mySelection", "line")
hideSelection("mySelection", "line")
centerOnSelection("mySelection")
loadTraj("structureName", "filePath.xtc")
delete("structureName")
colorSelection("mySelection", "line", "red")
colorByChain("mySelection", "s")
renameSelection("mySelection", "myNewSelection")
screenshot("C:/Users/myUserName/Desktop/UMolScreenshot1.png")
startVideo("C:/Users/myUserName/Desktop/UMolVid1.mp4")
stopVideo()
connectIMD("myStructure", "127.0.0.1", 8888)
disconnectIMD("myStructure")