VMD-L Mailing List
From: Diego Gomes (diego.enry_at_gmail.com)
Date: Fri Mar 01 2024 - 10:08:19 CST
- Next message: Yuan Xue: "Water molecules cling to protein in last frame"
- Previous message: Diego Gomes: "Re: Fwd: bond lengths and angle display"
- In reply to: Diego Gomes: "Re: Fwd: bond lengths and angle display"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
(Something went wrong with vmd-l, I'm sending it again)
Here's a script with a few comments I drafted for you.
Make sure to modify the selections (-sel) and molecule id as needed.
Learn more about Labels here:
https://www.ks.uiuc.edu/Research/vmd/current/ug/node133.html
Friendly,
Diego.
# Load 1ubq from PDB
mol new 1ubq
# Load topotools package
package require topotools
# Remove all current labels for Bonds and Angles
label delete Bonds all
label delete Angles all
# Loop over each bond and draw a label
foreach bond [topo getbondlist -sel "resid 1 to 10 and backbone" ] {
set i [lindex $bond 0]
set j [lindex $bond 1]
label add Bonds 0/$i 0/$j
}
# Guess angles from bond topology
topo guessangles
# Get the angle list
# Loop over each bond and draw a label
foreach angle [topo getanglelist -sel "resid 1 to 10 and backbone" ] {
set i [lindex $angle 1]
set j [lindex $angle 2]
set k [lindex $angle 3]
label add Angles 0/$i 0/$j 0/$k
}
On Thu, Feb 29, 2024 at 10:10 PM Diego Gomes <diego.enry_at_gmail.com> wrote:
> Here's a script with a few comments I drafted for you.
> Make sure to modify the selections (-sel) and molecule id as needed.
> .
> Learn more about Labels here:
> https://www.ks.uiuc.edu/Research/vmd/current/ug/node133.html
>
> Friendly,
> Diego.
>
> # Load 1ubq from PDB
> mol new 1ubq
>
> # Load topotools package
> package require topotools
>
> # Remove all current labels for Bonds and Angles
> label delete Bonds all
> label delete Angles all
>
> # Loop over each bond and draw a label
> foreach bond [topo getbondlist -sel "resid 1 to 10 and backbone" ] {
> set i [lindex $bond 0]
> set j [lindex $bond 1]
> label add Bonds 0/$i 0/$j
> }
>
> # Guess angles from bond topology
> topo guessangles
>
> # Get the angle list
> # Loop over each bond and draw a label
> foreach angle [topo getanglelist -sel "resid 1 to 10 and backbone" ] {
> set i [lindex $angle 1]
> set j [lindex $angle 2]
> set k [lindex $angle 3]
> label add Angles 0/$i 0/$j 0/$k
> }
>
> On Wed, Feb 28, 2024 at 10:20 PM SKM <srikasi.qut_at_gmail.com> wrote:
>
>>
>> ---------- Forwarded message ---------
>> From: Sri <srikasi.qut_at_gmail.com>
>> Date: Mon, 26 Feb 2024, 7:23 pm
>> Subject: bond lengths and angle display
>> To: owner-vmd-l_at_ks.uiuc.edu <owner-vmd-l_at_ks.uiuc.edu>
>>
>>
>> Hi
>>
>> Can VMD gives or show the bond lengths and angles of all selected atoms
>> in a crystal structure, all at once?
>>
>> Is such feature available?
>>
>>
>>
>> Regards
>>
>>
>>
>> Sent from Mail
>> <https://urldefense.com/v3/__https://go.microsoft.com/fwlink/?LinkId=550986__;!!DZ3fjg!6OllyOXoUARQt_hUGp_AZXh0hJXOyPoES8ssxrR-iI4AS71uNIS47YFaxYuJ9g7nQU75gcN0W0rSYURrBAFpPQ$>
>> for Windows
>>
>>
>>
>
>
> --
> Diego Enry B. Gomes, PhD
> Department of Physics at Auburn University &
> NIH Center for Macromolecular Modeling and Visualization
> Leach Science Center - Ste. 3182 - Auburn, AL
> dgomes_at_auburn.edu
>
-- Diego Enry B. Gomes, PhD Department of Physics at Auburn University & NIH Center for Macromolecular Modeling and Visualization Leach Science Center - Ste. 3182 - Auburn, AL dgomes_at_auburn.edu
- Next message: Yuan Xue: "Water molecules cling to protein in last frame"
- Previous message: Diego Gomes: "Re: Fwd: bond lengths and angle display"
- In reply to: Diego Gomes: "Re: Fwd: bond lengths and angle display"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]