<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ignat99</id>
	<title>PyMOL Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ignat99"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Ignat99"/>
	<updated>2026-05-06T15:45:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9303</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9303"/>
		<updated>2013-05-19T10:22:47Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py] (That is  [https://code.google.com/p/immersive-viz/wiki/UserManual UserManual] for GUI), that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
For convert data to MolViz format you need run next socket script client '''rucap.py''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# rucup.py - wraper for RUCAP driver (rucap.dll - http://rucap.ru/um5/support#sdk)&lt;br /&gt;
# need code from https://code.google.com/p/immersive-viz/source/browse/trunk/&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9302</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9302"/>
		<updated>2013-05-19T10:21:31Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py] ( [UserManual https://code.google.com/p/immersive-viz/wiki/UserManual] ), that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
For convert data to MolViz format you need run next socket script client '''rucap.py''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# rucup.py - wraper for RUCAP driver (rucap.dll - http://rucap.ru/um5/support#sdk)&lt;br /&gt;
# need code from https://code.google.com/p/immersive-viz/source/browse/trunk/&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9301</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9301"/>
		<updated>2013-05-19T10:21:10Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py] ([UserManual https://code.google.com/p/immersive-viz/wiki/UserManual]), that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
For convert data to MolViz format you need run next socket script client '''rucap.py''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# rucup.py - wraper for RUCAP driver (rucap.dll - http://rucap.ru/um5/support#sdk)&lt;br /&gt;
# need code from https://code.google.com/p/immersive-viz/source/browse/trunk/&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9300</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9300"/>
		<updated>2013-05-19T10:18:10Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py], that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
For convert data to MolViz format you need run next socket script client '''rucap.py''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# rucup.py - wraper for RUCAP driver (rucap.dll - http://rucap.ru/um5/support#sdk)&lt;br /&gt;
# need code from https://code.google.com/p/immersive-viz/source/browse/trunk/&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9299</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9299"/>
		<updated>2013-05-19T10:13:50Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py], that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
After you need run next script rucap.py:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# rucup.py - wraper for RUCAP driver (rucap.dll - http://rucap.ru/um5/support#sdk)&lt;br /&gt;
# need code from https://code.google.com/p/immersive-viz/source/browse/trunk/&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9298</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9298"/>
		<updated>2013-05-19T10:13:02Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py], that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
After you need run next script rucap.py:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# rucup.py - wraper for RUCAP driver (rucap.dll - http://rucap.ru/um5/support#sdk)&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9297</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9297"/>
		<updated>2013-05-19T10:09:49Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]. And optional with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolVizGeneratedGui.py MolVizGui.py], that make fine settings of interface RUCAP.&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the [https://code.google.com/p/immersive-viz/source/browse/trunk/SocketServer.py SocketServer.py]. &lt;br /&gt;
&lt;br /&gt;
After you need run next script rucap.py:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9296</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9296"/>
		<updated>2013-05-19T10:04:37Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with [https://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py MolViz.py]&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the SocketServer.py.&lt;br /&gt;
&lt;br /&gt;
After you need run next script rucap.py:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9295</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9295"/>
		<updated>2013-05-18T18:06:29Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with MolViz.py&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the SocketServer.py.&lt;br /&gt;
&lt;br /&gt;
After you need run next script rucap.py:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        #result = sock.recv(1024)&lt;br /&gt;
        #print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9294</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9294"/>
		<updated>2013-05-18T17:43:26Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
First, you need runing PyMol with MolViz.py&lt;br /&gt;
&lt;br /&gt;
     ./pymol -l MolViz.py 1jnx.pdb | python MolVizGui.py&lt;br /&gt;
&lt;br /&gt;
MolViz.py runing the SocketServer.py.&lt;br /&gt;
&lt;br /&gt;
After you need run next script rucap.py:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9293</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9293"/>
		<updated>2013-05-18T17:40:23Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;localhost&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9292</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9292"/>
		<updated>2013-05-13T11:04:21Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%.15f;Y%.15f;Z%.15f;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9291</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9291"/>
		<updated>2013-05-13T10:36:12Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Operating principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program rucap.dll for further processing. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%f4.5;Y%f4.5;Z%f4.5;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9290</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9290"/>
		<updated>2013-05-13T10:02:43Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* RUCAP UM-5 tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script, which is reproduced below, transmits data to [[ImmersiveViz]]. [[ImmersiveViz]] runs on top of PyMol and adjusts the PyMol screen view in accordance with the position of your eyes in the space in front of the monitor.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%f4.5;Y%f4.5;Z%f4.5;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9289</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9289"/>
		<updated>2013-05-13T09:24:14Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%f4.5;Y%f4.5;Z%f4.5;\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9288</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9288"/>
		<updated>2013-05-13T09:19:52Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
import socket&lt;br /&gt;
&lt;br /&gt;
HOST = &amp;quot;&amp;quot;                 # remote host-computer (localhost)&lt;br /&gt;
PORT = 4440              # port on remote host&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
sock.connect((HOST, PORT))&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
        sock.send('X%f4.5 Y%f4.5 Z%f4.5\n' % ( x.value, y.value, z.value))&lt;br /&gt;
        result = sock.recv(1024)&lt;br /&gt;
        print &amp;quot;Recive:&amp;quot;, result&lt;br /&gt;
&lt;br /&gt;
sock.close()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9287</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9287"/>
		<updated>2013-05-10T22:38:40Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* PyMol Script of ImmersiveViz */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;br /&gt;
[[Category:ThirdParty Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=HighlightAlignedSS&amp;diff=7792</id>
		<title>HighlightAlignedSS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=HighlightAlignedSS&amp;diff=7792"/>
		<updated>2013-05-10T22:31:14Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Highlight ss1.png|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
This script will align and color the paired secondary structures of the two proteins a similar rainbow color.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd, util&lt;br /&gt;
&lt;br /&gt;
def highlight_aligned_ss(obj1,obj2,transform=1,quiet=1):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
 &lt;br /&gt;
    Aligns two structures and colors their matching&lt;br /&gt;
    secondary structure elements with a matching&lt;br /&gt;
    rainbow colorscheme.&lt;br /&gt;
 &lt;br /&gt;
USAGE&lt;br /&gt;
 &lt;br /&gt;
    highlight_aligned_ss obj1, obj2&lt;br /&gt;
&lt;br /&gt;
    If transform=0 then the proteins are not&lt;br /&gt;
    moved after alignment.&lt;br /&gt;
&lt;br /&gt;
EXAMPLES&lt;br /&gt;
 &lt;br /&gt;
    highlight_aligned_ss 1cll, 1ggz&lt;br /&gt;
    highlight_aligned_ss 1rlw, 1byn and state 1&lt;br /&gt;
 &lt;br /&gt;
SEE ALSO&lt;br /&gt;
 &lt;br /&gt;
    align&lt;br /&gt;
&lt;br /&gt;
    JV 3-2-11&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if not cmd.count_atoms(obj1):&lt;br /&gt;
        print &amp;quot;Error: Object 1 needs at least a few atoms to align.&amp;quot;&lt;br /&gt;
        return None&lt;br /&gt;
    if not cmd.count_atoms(obj2):&lt;br /&gt;
        print &amp;quot;Error: Object 2 needs at least a few atoms to align.&amp;quot;&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    # align them&lt;br /&gt;
    uAln = cmd.get_unused_name(&amp;quot;aln&amp;quot;)&lt;br /&gt;
    cmd.align(obj1,obj2,object=uAln,transform=int(transform))&lt;br /&gt;
    cmd.hide(&amp;quot;cgo&amp;quot;, uAln)&lt;br /&gt;
&lt;br /&gt;
    # select atoms of similar SS&lt;br /&gt;
    uSimSS = cmd.get_unused_name(&amp;quot;similar_ss_&amp;quot;)&lt;br /&gt;
    cmd.select(uSimSS, &amp;quot;((%s or %s) in %s) and (ss 'S' or ss 'H')&amp;quot; %&lt;br /&gt;
               (obj1,obj2,uAln))&lt;br /&gt;
&lt;br /&gt;
    # color by rainbow; these could be &lt;br /&gt;
    # customized by function parameters&lt;br /&gt;
    util.rainbow(uSimSS + &amp;quot; and &amp;quot; + obj1)&lt;br /&gt;
    util.rainbow(uSimSS + &amp;quot; and &amp;quot; + obj2)&lt;br /&gt;
&lt;br /&gt;
    # now color everything else grey&lt;br /&gt;
    cmd.color(&amp;quot;grey70&amp;quot;, &amp;quot;not (%s)&amp;quot; % uSimSS)&lt;br /&gt;
&lt;br /&gt;
    # could also be an option to&lt;br /&gt;
    # update the representation&lt;br /&gt;
    # as cartoon&lt;br /&gt;
&lt;br /&gt;
    # hide indicators&lt;br /&gt;
    cmd.select(&amp;quot;none&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
cmd.extend(&amp;quot;highlight_aligned_ss&amp;quot;, highlight_aligned_ss)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9286</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9286"/>
		<updated>2013-05-10T21:57:37Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
This device has got only OS Windows support on current time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9285</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9285"/>
		<updated>2013-05-10T21:52:41Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 data of the users position into socket by your script rucap.py */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&lt;br /&gt;
That device in current time have only Windows OS support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9284</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9284"/>
		<updated>2013-05-10T21:34:37Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* 5 degrees of freedom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete view control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9283</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9283"/>
		<updated>2013-05-10T21:32:55Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Operating principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==5 degrees of freedom==&lt;br /&gt;
&lt;br /&gt;
There are 6 types of movement in three-dimensional space: linear move along X, Y, Z axes and also rotations of head around each of the axes.&lt;br /&gt;
RUCAP UM-5 supports 5 degrees of freedom: all types of movement and head rotations left-right (yaw) and up-down (pitch). These are all types of view control that are used in computer games that's why RUCAP UM-5 tracker gives You complete freedom of control in PyMol.&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9282</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9282"/>
		<updated>2013-05-10T21:30:48Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* RUCAP UM-5 tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating principle==&lt;br /&gt;
&lt;br /&gt;
Tracker RUCAP UM-5 in real time detects the absolute position and orientation of Your head relative to computer monitor. Antenna RU constantly traces the position of emitter CAP and transmits the data to RUCAP UM-5 Service program for further processing. The main window of service program shows head model that reflects all Your moves. Information from ultrasonic sensors is processed into concrete commands for the PyMol or computer program which runs RUCAP UM-5 profile at the moment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 Tracker Service program allows to set mouse, keyboard or joystick emulation. Once You chose the right type of emulation, you can set commands for different moves of the tracker.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9281</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9281"/>
		<updated>2013-05-10T20:47:17Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Getting UM-5 Data into your Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 data of the users position into socket by your script rucap.py ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
# Take data from UM-5 and put to the socket on port 4440.&lt;br /&gt;
#----- The server used to listen for head tracking&lt;br /&gt;
#		self.server = Server(self, 4440)&lt;br /&gt;
#----- The server used to listen for the GUI to update the values / display info&lt;br /&gt;
#		self.gui = Server(self, 4441)&lt;br /&gt;
&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9280</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9280"/>
		<updated>2013-05-10T20:40:09Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* RUCAP UM-5 tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 Data into your Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9279</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9279"/>
		<updated>2013-05-10T20:37:51Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* PyMol Script of ImmersiveViz */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 Data into your Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|RUCAP UM-5]]&lt;br /&gt;
[[Category:UI_Scripts|RUCAP UM-5]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9278</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9278"/>
		<updated>2013-05-10T20:37:26Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* RUCAP UM-5 tracker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.&lt;br /&gt;
The code based on project [[ImmersiveViz]].&lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 Data into your Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9277</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9277"/>
		<updated>2013-05-10T20:35:33Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* PyMol Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol. &lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 Data into your Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script of [[ImmersiveViz]] ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9276</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9276"/>
		<updated>2013-05-10T20:35:03Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Additional Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol. &lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 Data into your Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9275</id>
		<title>RUCAP UM-5</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=RUCAP_UM-5&amp;diff=9275"/>
		<updated>2013-05-10T20:28:14Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: Created page with &amp;quot;==RUCAP UM-5 tracker==  RUCAP UM-5 tracker is a wireless joystick for view control in PyMol.   == Getting UM-5 Data into your Script == &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt; # -*- coding: cp125...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==RUCAP UM-5 tracker==&lt;br /&gt;
&lt;br /&gt;
RUCAP UM-5 tracker is a wireless joystick for view control in PyMol. &lt;br /&gt;
&lt;br /&gt;
== Getting UM-5 Data into your Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: cp1251&lt;br /&gt;
from ctypes import *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RUCAP_VERSION = 3&lt;br /&gt;
RUCAP_RESULT_OK = 0;&lt;br /&gt;
RUCAP_RESULT_FAIL = 1;&lt;br /&gt;
RUCAP_RESULT_TRACKERAPP_OFF = 2;&lt;br /&gt;
RUCAP_RESULT_UNPLUGGED = 3;&lt;br /&gt;
RUCAP_RESULT_DEVICE_NOT_CREATED = 4;&lt;br /&gt;
RUCAP_RESULT_BAD_VERSION = 5;&lt;br /&gt;
&lt;br /&gt;
# load dll&lt;br /&gt;
a = CDLL(&amp;quot;rucap.dll&amp;quot;)&lt;br /&gt;
# call function, that returned int&lt;br /&gt;
a.RucapCreateDevice.restype = c_int&lt;br /&gt;
print &amp;quot;RucapCreateDevice:&amp;quot;&lt;br /&gt;
print a.RucapCreateDevice(c_int(RUCAP_VERSION))&lt;br /&gt;
&lt;br /&gt;
# initialisation of device&lt;br /&gt;
if (a.RucapCreateDevice(c_int(RUCAP_VERSION)) == RUCAP_RESULT_OK): print &amp;quot;Can`t create ruCap device\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a.RucapGetHeadPos.restype = c_int&lt;br /&gt;
x = c_float(0.0)&lt;br /&gt;
y = c_float(0.0)&lt;br /&gt;
z = c_float(0.0)&lt;br /&gt;
&lt;br /&gt;
# main loop&lt;br /&gt;
while (1) :&lt;br /&gt;
    if a.RucapGetHeadPos(byref(x),byref(y),byref(z)):&lt;br /&gt;
        print &amp;quot;No Position!&amp;quot;&lt;br /&gt;
    else :&lt;br /&gt;
        #print '%f %f %f\n' % ( x.value, y.value, z.value)&lt;br /&gt;
        print x.value, y.value, z.value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=ImmersiveViz&amp;diff=7796</id>
		<title>ImmersiveViz</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=ImmersiveViz&amp;diff=7796"/>
		<updated>2013-05-10T20:13:31Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: /* Head Tracking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==ImmersiveViz==&lt;br /&gt;
ImmersiveViz was developed as a component to monitor head tracking and rotate the molecule displayed in such a manner to provide an immersive experience. The ImmersiveViz (MolViz) software integrates two forms of head tracking: Wiimote ''infrared (IR) based'' (active tracking) and ''webcam based'' (passive tracking). By rotating the molecule in a direction opposite to the motion of the user's head we provide a 3D experience; to the user, it appears as if they are 'peeking' around the side of the object.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are also developing a Wiimote-based interface whereby the Wii remote can be used as an high degree-of-freedom input device (i.e. a 3d mouse).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comments, questions, and feedback''' can be sent to [http://groups.google.com/group/molviz molviz (at) googlegroups (dot) com]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Contributed by [http://www.haz.ca/ Christian Muise] and [http://www.cs.toronto.edu/~lilien Ryan Lilien] at the University of Toronto.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''Project Information:''' http://molviz.cs.toronto.edu/molviz&lt;br /&gt;
* '''Project Discussion:''' http://groups.google.com/group/molviz&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
=== Head Tracking ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/htdp/&lt;br /&gt;
* '''Source:''' http://code.google.com/p/htdp/source/browse&lt;br /&gt;
* '''Instructions:''' http://code.google.com/p/htdp/wiki/Users&lt;br /&gt;
* '''[[RUCAP UM-5]] tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|ImmersiveViz]]&lt;br /&gt;
[[Category:UI_Scripts|ImmersiveViz]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=ImmersiveViz&amp;diff=8347</id>
		<title>ImmersiveViz</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=ImmersiveViz&amp;diff=8347"/>
		<updated>2013-05-10T20:12:40Z</updated>

		<summary type="html">&lt;p&gt;Ignat99: add link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==ImmersiveViz==&lt;br /&gt;
ImmersiveViz was developed as a component to monitor head tracking and rotate the molecule displayed in such a manner to provide an immersive experience. The ImmersiveViz (MolViz) software integrates two forms of head tracking: Wiimote ''infrared (IR) based'' (active tracking) and ''webcam based'' (passive tracking). By rotating the molecule in a direction opposite to the motion of the user's head we provide a 3D experience; to the user, it appears as if they are 'peeking' around the side of the object.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our system contains a head tracking thread which communicates the users position to a PyMol script via a socket. The PyMol script unpacks the message and updates the world respectively. All rotation is done around the virtual origin in PyMol and zoom is also considered.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are also developing a Wiimote-based interface whereby the Wii remote can be used as an high degree-of-freedom input device (i.e. a 3d mouse).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comments, questions, and feedback''' can be sent to [http://groups.google.com/group/molviz molviz (at) googlegroups (dot) com]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Contributed by [http://www.haz.ca/ Christian Muise] and [http://www.cs.toronto.edu/~lilien Ryan Lilien] at the University of Toronto.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
=== Additional Information ===&lt;br /&gt;
* '''Project Information:''' http://molviz.cs.toronto.edu/molviz&lt;br /&gt;
* '''Project Discussion:''' http://groups.google.com/group/molviz&lt;br /&gt;
&lt;br /&gt;
=== PyMol Script ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/immersive-viz/&lt;br /&gt;
* '''Source:''' [http://code.google.com/p/immersive-viz/source/browse/trunk/MolViz.py here] and [http://code.google.com/p/immersive-viz/source/browse here]&lt;br /&gt;
* '''Instructions:''' [http://code.google.com/p/immersive-viz/ here] and [http://code.google.com/p/immersive-viz/wiki/UserManual here]&lt;br /&gt;
&lt;br /&gt;
=== Head Tracking ===&lt;br /&gt;
* '''Project Page:''' http://code.google.com/p/htdp/&lt;br /&gt;
* '''Source:''' http://code.google.com/p/htdp/source/browse&lt;br /&gt;
* '''Instructions:''' http://code.google.com/p/htdp/wiki/Users&lt;br /&gt;
* '''RUCAP UM-5 tracker:''' http://rucap.ru/en/um5/about&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|ImmersiveViz]]&lt;br /&gt;
[[Category:UI_Scripts|ImmersiveViz]]&lt;/div&gt;</summary>
		<author><name>Ignat99</name></author>
	</entry>
</feed>