<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=CGOCylinder</id>
	<title>CGOCylinder - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=CGOCylinder"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CGOCylinder&amp;action=history"/>
	<updated>2026-05-30T15:33:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CGOCylinder&amp;diff=4355&amp;oldid=prev</id>
		<title>Pyadmin: 2 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CGOCylinder&amp;diff=4355&amp;oldid=prev"/>
		<updated>2014-03-28T01:31:17Z</updated>

		<summary type="html">&lt;p&gt;2 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Overview =&lt;br /&gt;
[[:Category:CGO|CGO]] cylinders are compiled graphics cylinder objects.  If you set the cylinder height to something very small, you can mimic a circle (see examples).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery heights=300px widths=400px perrow=2&amp;gt;&lt;br /&gt;
Image:CylCGO.png|Example cylinder and label.  The label was added as a label on a [[Pseudoatom]].&lt;br /&gt;
Image:Cylsphere.png|Cylinder with a very thin cyilnder, here 0.2 Angstroms tall to mimic a circle.  The label was added as a label on a [[Pseudoatom]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Cylinder #1 on left.&lt;br /&gt;
x1,y1,z1 = 10, 0, 0 # start point&lt;br /&gt;
r1,g1,b1 = 1,0,0 # color (red)&lt;br /&gt;
x2,y2,z2 = 0.1, 0, 0 # end point&lt;br /&gt;
r2,g2,b2 = 1,1,0 # color (yellow)&lt;br /&gt;
radius = 10&lt;br /&gt;
cmd.load_cgo( [ 9.0, x1, y1, z1, x2, y2, z2, radius, r1, g1, b1, r2, g2, b2 ], &amp;quot;cylinder1&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
# Cylinder #2 (the circle)&lt;br /&gt;
x1,y1,z1 = -0.1, 0, 0 # start point&lt;br /&gt;
r1,g1,b1 = 1,0,0 # color (red)&lt;br /&gt;
x2,y2,z2 = 0.1, 0, 0 # end point&lt;br /&gt;
r2,g2,b2 = 1,1,0 # color (yellow)&lt;br /&gt;
radius = 10&lt;br /&gt;
cmd.load_cgo( [ 9.0, x1, y1, z1, x2, y2, z2, radius, r1, g1, b1, r2, g2, b2 ], &amp;quot;cylinder2&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
# to make the cylinder transparent, use&lt;br /&gt;
cmd.load_cgo( [ 25.0, 0.25, 9.0, x1, y1, z1, x2, y2, z2, radius, r1, g1, b1, r2, g2, b2 ], &amp;quot;cylinder1&amp;quot; )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.load_cgo( [ a1, a2, cylSpec, x1, y1, z1, x2, y2, z2, radius, r1, g1, b1, r2, g2, b2 ], objName )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The parameters are:&lt;br /&gt;
&lt;br /&gt;
'''a1, a2'''&lt;br /&gt;
:: a1=25 means 'ALPHA' (if you do '''from pymol.cgo import *''' you can then use CGO keywords, like ALPHA, CYLINDER, etc.  So, if a1=&amp;quot;25.0&amp;quot; then set a2 to some value in the range 0-1.&lt;br /&gt;
'''cylSpec'''&lt;br /&gt;
:: Cylinder specification: set this to 9.0 or if you did '''from pymol.cgo import *''' you can then use &amp;quot;CYLINDER&amp;quot;, here.&lt;br /&gt;
'''x1, y1, z1'''&lt;br /&gt;
:: coordinates for one end of the cylinder&lt;br /&gt;
'''x2, y2, z2'''&lt;br /&gt;
:: coordinates for one end of the cylinder&lt;br /&gt;
'''radius'''&lt;br /&gt;
:: radius of the cylinder&lt;br /&gt;
'''r1, b1, g1'''&lt;br /&gt;
::color one, (a triplet of values in the range 0-1&lt;br /&gt;
'''r2, b2, g2'''&lt;br /&gt;
::color two, (a triplet of values in the range 0-1; this allows a gradient&lt;br /&gt;
'''objName'''&lt;br /&gt;
::Name of cylinder object in PyMOL&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
PyMOL list.  Thanks to Tsjerk.&lt;br /&gt;
&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
</feed>