mailr5045 - /1.3/generic_fns/structure.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 20, 2008 - 14:20:
Author: bugman
Date: Wed Feb 20 14:20:43 2008
New Revision: 5045

URL: http://svn.gna.org/viewcvs/relax?rev=5045&view=rev
Log:
Deleted the generate_spheroid_axes() and generate_ellipsoid_axes() fns.


Modified:
    1.3/generic_fns/structure.py

Modified: 1.3/generic_fns/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure.py?rev=5045&r1=5044&r2=5045&view=diff
==============================================================================
--- 1.3/generic_fns/structure.py (original)
+++ 1.3/generic_fns/structure.py Wed Feb 20 14:20:43 2008
@@ -675,154 +675,6 @@
 
     # Close the file.
     tensor_pdb_file.close()
-
-
-def generate_ellipsoid_axes(chain_id=None, res_num=None, R=None, i=None):
-    """Generate the AXS and SIM residues of the ellipsoidal PDB tensor 
representation.
-
-    @param chain_id:    The chain identification code.
-    @type chain_id:     str
-    @param res_num:     The residue number.
-    @type res_num:      int
-    @param R:           The centre of mass.
-    @type R:            numpy array (float64)
-    @param i:           The Monte Carlo simulation index.
-    @type i:            int
-    @return:            None
-    """
-
-    # Alias the relevant data.
-    scale = scale
-    if i == None:
-        Dx = relax_data_store.diff[run].Dx
-        Dy = relax_data_store.diff[run].Dy
-        Dz = relax_data_store.diff[run].Dz
-        Dx_unit = relax_data_store.diff[run].Dx_unit
-        Dy_unit = relax_data_store.diff[run].Dy_unit
-        Dz_unit = relax_data_store.diff[run].Dz_unit
-        res_name = 'AXS'
-        atom_id_ext = '_' + chain_id
-    else:
-        Dx = relax_data_store.diff[run].Dx_sim[i]
-        Dy = relax_data_store.diff[run].Dy_sim[i]
-        Dz = relax_data_store.diff[run].Dz_sim[i]
-        Dx_unit = relax_data_store.diff[run].Dx_unit_sim[i]
-        Dy_unit = relax_data_store.diff[run].Dy_unit_sim[i]
-        Dz_unit = relax_data_store.diff[run].Dz_unit_sim[i]
-        res_name = 'SIM'
-        atom_id_ext = '_' + chain_id + '_sim' + `i`
-
-    # The Dx, Dy, and Dz vectors.
-    Dx_vect = Dx_unit * Dx * scale
-    Dy_vect = Dy_unit * Dy * scale
-    Dz_vect = Dz_unit * Dz * scale
-
-    # The negative Dx, Dy, and Dz vectors.
-    Dx_vect_neg = -Dx_vect
-    Dy_vect_neg = -Dy_vect
-    Dz_vect_neg = -Dz_vect
-
-    # Positions relative to the centre of mass.
-    Dx_vect = R + Dx_vect
-    Dy_vect = R + Dy_vect
-    Dz_vect = R + Dz_vect
-    Dx_vect_neg = R + Dx_vect_neg
-    Dy_vect_neg = R + Dy_vect_neg
-    Dz_vect_neg = R + Dz_vect_neg
-
-    # Create the 'AXS' residue.
-    atom_add(atomic_data=atomic_data, atom_id='R_axes'+atom_id_ext, 
record_name='HETATM', atom_name='R', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=R, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dx'+atom_id_ext, 
record_name='HETATM', atom_name='Dx', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dx_vect, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dy'+atom_id_ext, 
record_name='HETATM', atom_name='Dy', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dy_vect, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dz'+atom_id_ext, 
record_name='HETATM', atom_name='Dz', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dz_vect, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dx_neg'+atom_id_ext, 
record_name='HETATM', atom_name='Dx', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dx_vect_neg, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dy_neg'+atom_id_ext, 
record_name='HETATM', atom_name='Dy', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dy_vect_neg, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dz_neg'+atom_id_ext, 
record_name='HETATM', atom_name='Dz', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dz_vect_neg, element='C')
-    atom_connect(atomic_data=atomic_data, atom_id='Dx'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-    atom_connect(atomic_data=atomic_data, atom_id='Dy'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-    atom_connect(atomic_data=atomic_data, atom_id='Dz'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-    atom_connect(atomic_data=atomic_data, atom_id='Dx_neg'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-    atom_connect(atomic_data=atomic_data, atom_id='Dy_neg'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-    atom_connect(atomic_data=atomic_data, atom_id='Dz_neg'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-
-    # Add six more atoms to allow the axis labels to be shifted just outside 
of the geometric object.
-    if i == None:
-        # A slightly longer vector (by 3 Angstrom).
-        Dx_vect = Dx_unit * (Dx * scale + 3.0)
-        Dy_vect = Dy_unit * (Dy * scale + 3.0)
-        Dz_vect = Dz_unit * (Dz * scale + 3.0)
-
-        # Add the atoms.
-        atom_add(atomic_data=atomic_data, atom_id='Dx label'+atom_id_ext, 
record_name='HETATM', atom_name='Dx', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=R+Dx_vect, element='N')
-        atom_add(atomic_data=atomic_data, atom_id='Dx neg 
label'+atom_id_ext, record_name='HETATM', atom_name='Dx', res_name=res_name, 
chain_id=chain_id, res_num=res_num, pos=R-Dx_vect, element='N')
-        atom_add(atomic_data=atomic_data, atom_id='Dy label'+atom_id_ext, 
record_name='HETATM', atom_name='Dy', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=R+Dy_vect, element='N')
-        atom_add(atomic_data=atomic_data, atom_id='Dy neg 
label'+atom_id_ext, record_name='HETATM', atom_name='Dy', res_name=res_name, 
chain_id=chain_id, res_num=res_num, pos=R-Dy_vect, element='N')
-        atom_add(atomic_data=atomic_data, atom_id='Dz label'+atom_id_ext, 
record_name='HETATM', atom_name='Dz', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=R+Dz_vect, element='N')
-        atom_add(atomic_data=atomic_data, atom_id='Dz neg 
label'+atom_id_ext, record_name='HETATM', atom_name='Dz', res_name=res_name, 
chain_id=chain_id, res_num=res_num, pos=R-Dz_vect, element='N')
-
-    # Print out.
-    if i == None:
-        print "    Dx vector (scaled + shifted to R):   " + `Dx_vect`
-        print "    Dy vector (scaled + shifted to R):   " + `Dy_vect`
-        print "    Dz vector (scaled + shifted to R):   " + `Dz_vect`
-
-
-def generate_spheroid_axes(chain_id=None, res_num=None, R=None, i=None):
-    """Generate the AXS and SIM residues of the spheroid PDB tensor 
representation.
-
-    @param chain_id:    The chain identification code.
-    @type chain_id:     str
-    @param res_num:     The residue number.
-    @type res_num:      int
-    @param R:           The centre of mass.
-    @type R:            numpy array (float64)
-    @param i:           The Monte Carlo simulation index.
-    @type i:            int
-    @return:            None
-    """
-
-    # Alias the relevant data.
-    scale = scale
-    if i == None:
-        Dpar = relax_data_store.diff[run].Dpar
-        Dpar_unit = relax_data_store.diff[run].Dpar_unit
-        res_name = 'AXS'
-        atom_id_ext = '_' + chain_id
-    else:
-        Dpar = relax_data_store.diff[run].Dpar_sim[i]
-        Dpar_unit = relax_data_store.diff[run].Dpar_unit_sim[i]
-        res_name = 'SIM'
-        atom_id_ext = '_' + chain_id + '_sim' + `i`
-
-    # The Dpar vector.
-    Dpar_vect = Dpar_unit * Dpar * scale
-
-    # The negative Dpar vector.
-    Dpar_vect_neg = -Dpar_vect
-
-    # Position of both vectors relative to the centre of mass.
-    Dpar_vect = R + Dpar_vect
-    Dpar_vect_neg = R + Dpar_vect_neg
-
-    # Create the 'AXS' residue.
-    atom_add(atomic_data=atomic_data, atom_id='R_axes'+atom_id_ext, 
record_name='HETATM', atom_name='R', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=R, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dpar'+atom_id_ext, 
record_name='HETATM', atom_name='Dpar', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dpar_vect, element='C')
-    atom_add(atomic_data=atomic_data, atom_id='Dpar_neg'+atom_id_ext, 
record_name='HETATM', atom_name='Dpar', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=Dpar_vect_neg, element='C')
-    atom_connect(atomic_data=atomic_data, atom_id='Dpar'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-    atom_connect(atomic_data=atomic_data, atom_id='Dpar_neg'+atom_id_ext, 
bonded_id='R_axes'+atom_id_ext)
-
-    # Add two more atoms to allow the axis labels to be shifted just outside 
of the geometric object.
-    if i == None:
-        # A slightly longer vector (by 3 Angstrom).
-        vect = Dpar_unit * (Dpar * scale + 3.0)
-
-        # Add the atoms.
-        atom_add(atomic_data=atomic_data, atom_id='Dpar label'+atom_id_ext, 
record_name='HETATM', atom_name='Dpar', res_name=res_name, chain_id=chain_id, 
res_num=res_num, pos=R+vect, element='N')
-        atom_add(atomic_data=atomic_data, atom_id='Dpar neg 
label'+atom_id_ext, record_name='HETATM', atom_name='Dpar', 
res_name=res_name, chain_id=chain_id, res_num=res_num, pos=R-vect, 
element='N')
-
-    # Print out.
-    if i == None:
-        print "    Dpar vector (scaled + shifted to R): " + `Dpar_vect`
 
 
 def generate_vector_residues(atomic_data=None, vector=None, atom_name=None, 
res_name_vect='AXS', sim_vectors=None, res_name_sim='SIM', chain_id=None, 
res_num=None, origin=None, scale=1.0, label_placement=1.1, neg=False):




Related Messages


Powered by MHonArc, Updated Wed Feb 20 14:40:43 2008