This is a read-only mirror of pymolwiki.org

Difference between revisions of "Removealt"

From PyMOL Wiki
Jump to navigation Jump to search
m (moved RemoveAlt to Removealt: small letters)
(usage, example)
Line 6: Line 6:
 
}}
 
}}
  
= Overview =
 
 
[[removeAlt]] removes all atoms from '''obj''' that have alternate locations but aren't altloc '''keep'''.
 
[[removeAlt]] removes all atoms from '''obj''' that have alternate locations but aren't altloc '''keep'''.
  
=== Example 1 ===
+
== Usage ==
{{Template:PymolScriptRepoDownload|examples/removealt_1.pml}}
 
<include src="https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/examples/removealt_1.pml" highlight="python" />
 
  
= See Also =
+
removealt [ obj [, keep ]]
 +
 
 +
== Example ==
 +
 
 +
<syntaxhighlight lang="python">
 +
import removealt
 +
 
 +
fetch 1hxb, async=0
 +
 
 +
select ligA, alt a
 +
select ligB, alt b
 +
 
 +
count_atoms ligA    # 49 atoms
 +
count_atoms ligB    # 49 atoms
 +
 
 +
removealt 1hxb, b
 +
 
 +
count_atoms ligA    # 0 atoms
 +
count_atoms ligB    # 49 atoms
 +
</syntaxhighlight>
 +
 
 +
== See Also ==
 
[[Property_Selectors#Alternate_Locations|Handling Alternate Locations]] and [[alter]]
 
[[Property_Selectors#Alternate_Locations|Handling Alternate Locations]] and [[alter]]
 +
 
[[Category:Script_Library]]
 
[[Category:Script_Library]]
 
[[Category:ObjSel_Scripts]]
 
[[Category:ObjSel_Scripts]]

Revision as of 09:20, 14 December 2011

Type Python Script
Download removealt.py
Author(s) Jason Vertrees
License Free
This code has been put under version control in the project Pymol-script-repo

removeAlt removes all atoms from obj that have alternate locations but aren't altloc keep.

Usage

removealt [ obj [, keep ]]

Example

import removealt

fetch 1hxb, async=0

select ligA, alt a
select ligB, alt b

count_atoms ligA    # 49 atoms
count_atoms ligB    # 49 atoms

removealt 1hxb, b

count_atoms ligA    # 0 atoms
count_atoms ligB    # 49 atoms

See Also

Handling Alternate Locations and alter