Author: bugman Date: Sun Oct 29 03:34:21 2006 New Revision: 2678 URL: http://svn.gna.org/viewcvs/relax?rev=2678&view=rev Log: The unique axis of the spheroid is now represented by the Dpar unit vector in the tensor PDB. As the Dpar unit vector has been added to the centre of mass to create a HETATM record, the distance between the atom representing the centre of mass and the unique axis is 1 Angstrom. Modified: branches/tensor_pdb/generic_fns/pdb.py Modified: branches/tensor_pdb/generic_fns/pdb.py URL: http://svn.gna.org/viewcvs/relax/branches/tensor_pdb/generic_fns/pdb.py?rev=2678&r1=2677&r2=2678&view=diff ============================================================================== --- branches/tensor_pdb/generic_fns/pdb.py (original) +++ branches/tensor_pdb/generic_fns/pdb.py Sun Oct 29 03:34:21 2006 @@ -178,11 +178,33 @@ hetatm.append(R) + # Axes of the tensor. + ##################### + + # Get the unique axis of the spheroid. + if self.relax.data.diff[self.run].type == 'spheroid': + # Print out. + print "Calculating the Dpar unit vector (the unique axis of the diffusion tensor)." + + # The Dpar unit vector. + Dpar_unit = self.relax.data.diff[self.run].Dpar_unit + + # Position relative to the center of mass. + pos = R + Dpar_unit + + # Add the position as a HETATM. + hetatm.append(R + self.relax.data.diff[self.run].Dpar_unit) + + # Print out. + print " Unit vector: " + `Dpar_unit` + print " Relative to center of mass: " + `pos` + + # Connectivities. ################# - #conect.append(['1', '2']) - #conect.append(['2', '1']) + conect.append(['1', '2']) + conect.append(['2', '1']) # Create the PDB file.