Thank you for all of the relies here! The problems have been solved by Heroes! I really appreciate it!!

Regrading to the questions I posted here (measure the angle between two planes, the angle between one line and one plane, and the distance between two planes)I would like to give the concluted proceduces here depending on the methods you guys gave me. I will list the methods which work by my own trial (Ubuntu 14.04). I am sorry I am not going to list all of the methods here.

Meausre the angle between two planes

Method1 by PYMOL (From Marlene Holder and Thomas Holder)
Preparation:
Use the latest version of psico which has "angle_between_helices" function combined with "plane_orientation" . You can download the PSICO package and integrate it into your PYMOL, or you can unzip the package and open your PYMOL in the directory of PSICO.
EXAMPLE:
fetch #your structure here, async=0
select ring1, # selection expression of ring atoms
select ring2, # selection expression of ring atoms
import psico.orientation
angle_between_helices ring1, ring2, plane_orientation

Method2 by Chimera
Open your structure;
go to tools/structure analysis/Axes-planes-centroids;
in Axes-planes-centroids window, define the plane1 by selecting the relative atoms;
define the plane2 by selecting the relative atoms,
Highlight the two planes in Axes-planes-centroids window, then the angel will come out automatically in the bottome of this window.


Meausre the angle between one line and one plane

Method1 by PYMOL (From Thomas Holder)
Preparation: PYMOL+PSICO
EXAMPLE:
ring_sele = '...' # selection expression of ring atoms
line_sele = '...' # selection expression of two atoms

import math
import chempy.cpv
import psico.orientation

ring_normal = psico.orientation.plane_orientation(ring_sele, guide=0)[1]
line_direction = psico.orientation.cafit_orientation(line_sele, guide=0)[1]
angle = chempy.cpv.get_angle(ring_normal, line_direction)

print 'angle: ', math.degrees(angle), 'degrees'

Method2 by Chimera
Open your structure;
go to tools/structure analysis/Axes-planes-centroids;
in Axes-planes-centroids window, define the axis1 by selecting two atoms;
Define the plane1 by selecting the relative atoms,
Highlight the axis1 and plane1 in Axes-planes-centroids window, then the angel will come out automatically in the bottome of this window.

Measure the distance between two planes

If there are two planes which are not perfectly parallel to each other (most of case), we may have to define a center of each plane, then get the vertical distance1 between the center1 and the plane2, and also the second vertical distance2 between the center2 and the plain1. if they are not parallel, the distance 1 is not equal to the distance2. Of cause you can also get the distance3 between two centers.

Method1 from PYML (From Thomas Holder)
Preparation: PYMOL+PSICO,
EXAMPLE:
ring_sele = '' # select the related atoms for plane1
atom_sele = 'psudoatom2' # psudoatom2 is the center of the plan2. you can define it by the command "psudoatom"

import chempy.cpv
import psico.orientation
import pymol.cmd

# plane
pos, normal = psico.orientation.plane_orientation(ring_sele, guide=0)

# point (single atom position)
atom_pos = pymol.cmd.get_atom_coords(atom_sele)

hyp = chempy.cpv.sub(atom_pos, pos)
d = chempy.cpv.dot_product(normal, hyp) # distance1

print 'point to plane distance:', d, 'angstrom' # show the value of distance1

Rerun this recipe to get distance2.

Method2 by Chimera
Open your structure,
go to tools/structure analysis/Axes-planes-centroids;
in Axes-planes-centroids window, define plane1 by selecting two atoms;
define centroid1 of the plane1.
define plane2 by selecting the relative atoms;
define centroid2 of the plan2;
highlight the centroid1 and plane2, then the distance1 will come out automatically in the bottome of the Axes-planes-centroids window.
highlight the centroid2 and plane1 to the distance2.


I personally like the PYMOL+PSICO, since PYMOL can display the vectors very well by PSICO. I also don't want to draw a picture from PYMOL, then jump to another display software to get some parameters.

Chimera is good at this kind of measurements. It is easy and just some mouse operation. The only problem is hard to see the angles and distances in the screen in this specific case.

I hope this helps.


Bing Wang


_______________________________
From: CCP4 bulletin board [[log in to unmask]] on behalf of Wang, Bing [[log in to unmask]]
Sent: Friday, August 14, 2015 11:17 AM
To: [log in to unmask]
Subject: Re: [ccp4bb] Pymol question: measure the angle between a line and a plane

if there are two planes which are not parallel to each other, we may have to define a center of each plane, then get the vertical distance1 between center1 and plane2 and the second vertical distance2 between center2 and plain1. if they are not parallel, distance 1 is not equal to distance2. if follow this idea (i am not sure it is correct or not), I just figure out how to measure it by Chimera. I am also curious how to measure it by PYMOL.

I should tell more about my aim to get this kind of parameters. I want to get this answers because we want to know how overlap the orbital of ligand with some metals in protein. this can help us to undersdand how the ligand interact with metal (e.g. nitric oxide can bind with Fe with liner or bent mode), in furthur we can know the reactivity for each of different of interaction (e.g. the liner mode of NO is more electrophilic and more reactive with thiols). Anyway~~~

Thanks!

Bing
________________________________________
From: Ronald E Stenkamp [[log in to unmask]]
Sent: Friday, August 14, 2015 10:47 AM
To: Wang, Bing
Subject: Re: [ccp4bb] Pymol question: measure the angle between a line and a plane

Hi.

I'm confused by your question. I don't know what you mean by "vertical". If the planes are parallel, I assume "vertical" means along the line perpendicular to them. If you have two planes that are not parallel to one another, how do you define "vertical"? I think most structure analysis programs, especially those found in the small molecule crystallography programs, determine the distance between the centers of the planes.

I'm not familiar with the most current small molecule crystallography programs, but older programs had the ability to calculate the equation of a plane through several atoms. They could also do that for several planes and calculate the distances and dihedral angles between them.

Ron

On Fri, 14 Aug 2015, Wang, Bing wrote:

> I really appreciated your help! It works perfectly!!!
>
> Can i ask another question? Sorry to keep bother you! Is it possible to measure the vertical distance between two planes by PSICO? I really like this powerful tool. Not the distance between two pseudoatoms in the center of two planes. I want to get the vertical distance of the two planes in space.
>
> Thank you very much!
>
> Bing Wang
> ________________________________________
> From: Thomas Holder [[log in to unmask]]
> Sent: Thursday, August 13, 2015 5:18 PM
> To: Wang, Bing
> Cc: [log in to unmask]
> Subject: Re: [ccp4bb] Pymol question: measure the angle between a line and a plane
>
> Hi Bing,
>
> here's your PyMOL + PSICO solution:
>
> ring_sele = '...' # selection expression of ring atoms
> line_sele = '...' # selection expression of two atoms
>
> import math
> import chempy.cpv
> import psico.orientation
>
> ring_normal = psico.orientation.plane_orientation(ring_sele, guide=0)[1]
> line_direction = psico.orientation.cafit_orientation(line_sele, guide=0)[1]
> angle = chempy.cpv.get_angle(ring_normal, line_direction)
>
> print 'angle: ', math.degrees(angle), 'degrees'
>
> Hope that helps.
>
> Cheers,
> Thomas
>
> On 13 Aug 2015, at 15:12, Wang, Bing <[log in to unmask]> wrote:
>
>> Hi Heroes,
>>
>> Does anybody know how to measure the angle between a line (e.g. a line between two atoms) and a plane (e. g. a plane from aromatic ring) in PYMOL. I do know how to use PISCO to measure the angle between two planes. I am not sure whether I can still use PISCO in this case, or I do need another plugin, or some any other methods. Please show me the details.
>>
>> Thank you very much!
>>
>> Bing Wang
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.