Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Distance
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===EXAMPLES=== * Get and show the distance from residue 10's alpha carbon to residue 40's alpha carbon in 1ESR: <source lang="python"> # make the first residue 0. zero_residues 1esr, 0 distance i. 10 and n . CA, i. 40 and n. CA </source> * Get and show the distance from residue 10's alpha carbon to residue 35-42's alpha carbon in 1ESR: <source lang="python"> # make the first residue 0. zero_residues 1esr, 0 distance i. 10 and n . CA, i. 35-42 and n. CA </source> * This neat example shows how to create distance measurements from an atom in a molecule to all other atoms in the molecule (since PyMol supports wildcards). <source lang="python"> cmd.distance("(/mol1///1/C)","(/mol1///2/C*)") </source> or written without the PyMolScript code, dist /mol1///1/C, /mol1///2/C* * Create multiple distance objects <source lang="python"> for at1 in cmd.index("resi 10"): \ for at2 in cmd.index("resi 11"): \ cmd.distance(None, "%s`%d"%at1, "%s`%d"%at2) </source> <source lang="python"> distance (selection1), (selection2) # example dist i. 158 and n. CA, i. 160 and n. CA distance mydist, 14/CA, 29/CA distance hbonds, all, all, 3.2, mode=2 </source>
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Distance
(section)
Add topic