<?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=Spheres</id>
	<title>Spheres - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Spheres"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spheres&amp;action=history"/>
	<updated>2026-05-25T02:01:19Z</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=Spheres&amp;diff=10343&amp;oldid=prev</id>
		<title>Bell: 7 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spheres&amp;diff=10343&amp;oldid=prev"/>
		<updated>2014-03-28T03:55:49Z</updated>

		<summary type="html">&lt;p&gt;7 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:Spheres_ex.png|thumb|right|Normal Sphere Representation Example|center]]&lt;br /&gt;
&lt;br /&gt;
==Representation==&lt;br /&gt;
To enable the '''spheres''' representation do the following for any selection SEL,&lt;br /&gt;
 show spheres, SEL&lt;br /&gt;
&lt;br /&gt;
==Adjusting Sphere Size==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter selection, vdw=number&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
Shrink the size of all Iron atoms:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter elem fe, vdw=1.0&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dramatically enlarge all spheres in an object&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter object, vdw=4.0&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenGL Shaders &amp;amp; Spheres==&lt;br /&gt;
Newer OpenGL supported cards (like the NVidia 5950 Ultra, or the 6800 GT Ultra) support '''Shaders'''.  Shaders are best used for massive numbers of molecules that are to be represented as spheres.  Typical ranges will now include 500 000 to 3 000 000 atoms!  Take a look, the following example is of a viral nucleocapsid: 261 240 atoms!  [[:Category:Performance|Performance]] and visual quality -- without rendering -- are far improved.&lt;br /&gt;
&lt;br /&gt;
===Comparing Shaders and No-Shaders===&lt;br /&gt;
[[Image:No_shader.jpg|thumb|Normal spheres: no shaders|center]]&lt;br /&gt;
[[Image:Shader.jpg|thumb|(sphere_mode=5) Shader Spheres|center]]&lt;br /&gt;
&lt;br /&gt;
To turn on Sphere Shaders use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set sphere_mode, 5&lt;br /&gt;
as spheres, SEL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where '''SEL''' is the name of your selection.  Getting normal sphere mode back is easy:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set sphere_mode, 4&lt;br /&gt;
as spheres, SEL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enabling Shaders===&lt;br /&gt;
If the above doesn't work, then you may need to rebuild PyMol so that it builds the shaders source code.  To do this, you simply need to edit the '''setup.py''' file before you build PyMol.&lt;br /&gt;
&lt;br /&gt;
Find the appropriate line in your '''setup.py''' file depending on your system.  The relevant lines are, first for Windows,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
if sys.platform=='win32':&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and for Windows using Cygwin&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
elif sys.platform=='cygwin':&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and finally for *nix or other systems as the following&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
else:&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Under this code, find the&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def_macros=[(&amp;quot;_PYMOL_MODULE&amp;quot;,None),&lt;br /&gt;
            (&amp;quot;_PYMOL_INLINE&amp;quot;,None),&lt;br /&gt;
#           (&amp;quot;_PYMOL_NUMPY&amp;quot;,None),&lt;br /&gt;
            (&amp;quot;_HAVE_LIBPNG&amp;quot;,None)]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and make it&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  def_macros=[(&amp;quot;_PYMOL_MODULE&amp;quot;,None),&lt;br /&gt;
              (&amp;quot;_PYMOL_INLINE&amp;quot;,None),&lt;br /&gt;
#             (&amp;quot;_PYMOL_NUMPY&amp;quot;,None),&lt;br /&gt;
              (&amp;quot;_HAVE_LIBPNG&amp;quot;,None),&lt;br /&gt;
              (&amp;quot;_PYMOL_OPENGL_SHADERS&amp;quot;,None)]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I just added the&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
(&amp;quot;_PYMOL_OPENGL_SHADERS&amp;quot;,None)]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
line.&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:Installation|Installation Page]] to find out how to build PyMol.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Spheres]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Spheres&amp;diff=10340&amp;oldid=prev</id>
		<title>Vossman: Tip for changing sphere sizes</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spheres&amp;diff=10340&amp;oldid=prev"/>
		<updated>2005-11-13T21:09:45Z</updated>

		<summary type="html">&lt;p&gt;Tip for changing sphere sizes&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:Spheres_ex.png|thumb|Normal Sphere Representation Example|center]]&lt;br /&gt;
&lt;br /&gt;
==Representation==&lt;br /&gt;
To enable the '''spheres''' representation do the following for any selection SEL,&lt;br /&gt;
 show spheres, SEL&lt;br /&gt;
&lt;br /&gt;
==Adjusting Sphere Size==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter selection, vdw=number&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
Shrink the size of all Iron atoms:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter elem fe, vdw=1.0&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dramatically enlarge all spheres in an object&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter object, vdw=4.0&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenGL Shaders &amp;amp; Spheres==&lt;br /&gt;
Newer OpenGL supported cards (like the NVidia 5950 Ultra, or the 6800 GT Ultra) support '''Shaders'''.  Shaders are best used for massive numbers of molecules that are to be represented as spheres.  Typical ranges will now include 500 000 to 3 000 000 atoms!  Take a look, the following example is of a viral nucleocapsid: 261 240 atoms!  Performance and visual quality -- without rendering -- are far improved.&lt;br /&gt;
&lt;br /&gt;
===Comparing Shaders and No-Shaders===&lt;br /&gt;
[[Image:No_shader.jpg|thumb|Normal spheres: no shaders|center]]&lt;br /&gt;
[[Image:Shader.jpg|thumb|(sphere_mode=5) Shader Spheres|center]]&lt;br /&gt;
&lt;br /&gt;
To turn on Sphere Shaders use&lt;br /&gt;
 set sphere_mode, 5&lt;br /&gt;
 as spheres, SEL&lt;br /&gt;
where '''SEL''' is the name of your selection.  Getting normal sphere mode back is easy:&lt;br /&gt;
 set sphere_mode, 4&lt;br /&gt;
 as spheres, SEL&lt;br /&gt;
&lt;br /&gt;
===Enabling Shaders===&lt;br /&gt;
If the above doesn't work, then you may need to rebuild PyMol so that it builds the shaders source code.  To do this, you simply need to edit the '''setup.py''' file before you build PyMol.&lt;br /&gt;
&lt;br /&gt;
Find the appropriate line in your '''setup.py''' file depending on your system.  The relevant lines are, first for Windows,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
if sys.platform=='win32':&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and for Windows using Cygwin&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
elif sys.platform=='cygwin':&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and finally for *nix or other systems as the following&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
else:&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Under this code, find the&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def_macros=[(&amp;quot;_PYMOL_MODULE&amp;quot;,None),&lt;br /&gt;
            (&amp;quot;_PYMOL_INLINE&amp;quot;,None),&lt;br /&gt;
#           (&amp;quot;_PYMOL_NUMPY&amp;quot;,None),&lt;br /&gt;
            (&amp;quot;_HAVE_LIBPNG&amp;quot;,None)]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and make it&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  def_macros=[(&amp;quot;_PYMOL_MODULE&amp;quot;,None),&lt;br /&gt;
              (&amp;quot;_PYMOL_INLINE&amp;quot;,None),&lt;br /&gt;
#             (&amp;quot;_PYMOL_NUMPY&amp;quot;,None),&lt;br /&gt;
              (&amp;quot;_HAVE_LIBPNG&amp;quot;,None),&lt;br /&gt;
              (&amp;quot;_PYMOL_OPENGL_SHADERS&amp;quot;,None)]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I just added the&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
(&amp;quot;_PYMOL_OPENGL_SHADERS&amp;quot;,None)]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
line.&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:Installation|Installation Page]] to find out how to build PyMol.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Spheres]]&lt;/div&gt;</summary>
		<author><name>Vossman</name></author>
	</entry>
</feed>