mailr5077 - /branches/N_state_model/specific_fns/n_state_model.py


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

Header


Content

Posted by edward on February 21, 2008 - 09:58:
Author: bugman
Date: Thu Feb 21 09:58:35 2008
New Revision: 5077

URL: http://svn.gna.org/viewcvs/relax?rev=5077&view=rev
Log:
Added code to the cone_pdb() function to terminate the chain and write the 
PDB file.


Modified:
    branches/N_state_model/specific_fns/n_state_model.py

Modified: branches/N_state_model/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=5077&r1=5076&r2=5077&view=diff
==============================================================================
--- branches/N_state_model/specific_fns/n_state_model.py (original)
+++ branches/N_state_model/specific_fns/n_state_model.py Thu Feb 21 09:58:35 
2008
@@ -34,6 +34,7 @@
 from maths_fns.rotation_matrix import R_euler_zyz
 from minfx.generic import generic_minimise
 from relax_errors import RelaxError, RelaxInfError, RelaxNaNError, 
RelaxNoModelError, RelaxNoTensorError
+from relax_io import open_write_file
 from specific_fns.base_class import Common_functions
 
 
@@ -222,6 +223,24 @@
         elif cone_type == 'diff on cone':
             angle = cdp.theta_diff_on_cone
         generic_fns.structure.cone_edge(atomic_data=atomic_data, 
res_num=res_num, apex=cdp.pivot_point, axis=cdp.rot_CoM/norm(cdp.rot_CoM), 
angle=angle, length=norm(cdp.red_CoM), inc=20)
+
+        # Terminate the chain.
+        generic_fns.structure.terminate(atomic_data=atomic_data, 
res_num=res_num)
+
+        # Create the PDB file.
+        ######################
+
+        # Print out.
+        print "\nGenerating the PDB file."
+
+        # Open the PDB file for writing.
+        pdb_file = open_write_file(file, dir, force=force)
+
+        # Write the data.
+        generic_fns.structure.write_pdb_file(atomic_data, pdb_file)
+
+        # Close the file.
+        pdb_file.close()
 
         for key in atomic_data.keys():
             print "\n\n" + `key` + ": \n" + `atomic_data[key]`




Related Messages


Powered by MHonArc, Updated Thu Feb 21 10:00:35 2008