Author: bugman Date: Mon Nov 17 12:04:25 2014 New Revision: 26597 URL: http://svn.gna.org/viewcvs/relax?rev=26597&view=rev Log: Updated the PDB file in the test_suite/shared_data/model_free/sphere/ directory.
The relax library is now being used to create the PDB file. Additional TER and CONECT records are now being created so the result is a more correct PDB file. Modified: trunk/test_suite/shared_data/model_free/sphere/create_sphere.py (contents, props changed) trunk/test_suite/shared_data/model_free/sphere/sphere.pdb Modified: trunk/test_suite/shared_data/model_free/sphere/create_sphere.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/model_free/sphere/create_sphere.py?rev=26597&r1=26596&r2=26597&view=diff ============================================================================== --- trunk/test_suite/shared_data/model_free/sphere/create_sphere.py (original) +++ trunk/test_suite/shared_data/model_free/sphere/create_sphere.py Mon Nov 17 12:04:25 2014 @@ -1,35 +1,11 @@ -#!/usr/bin/python +# relax script for creating the spherical PDB file. +# Copyright 2004-2014, Edward d'Auvergne -# Copyright 2004-2011, Edward d'Auvergne - +# Python module imports. from math import acos, cos, pi, sin, sqrt - -def pdb_line(file=None, atom_num=0, atom=None, res_num=0, res_name=None, vector=None): - """Function for adding a line to the PDB file.""" - - # ATOM. - file.write('%-4s' % 'ATOM') - - # Atom number and type. - file.write('%7i' % atom_num) - file.write(' %-4s' % atom) - - # Residue number and name. - file.write('%-4s' % res_name) - file.write('%5i ' % res_num) - - # Vector. - file.write('%8.3f' % vector[0]) - file.write('%8.3f' % vector[1]) - file.write('%8.3f' % vector[2]) - - # I don't know what. - file.write('%6.2f' % 1.0) - file.write('%6.2f' % 0.0) - - # End of line. - file.write('\n') +# relax module imports. +from lib.structure.pdb_write import atom, conect, ter # Number of increments. @@ -102,10 +78,10 @@ continue # Nitrogen line. - pdb_line(file=file, atom_num=atom_num, atom='N', res_num=res_num, res_name='GLY', vector=[0.0, 0.0, 0.0]) + atom(file=file, serial=atom_num, name='N', res_seq=res_num, res_name='GLY', x=0.0, y=0.0, z=0.0) # Hydrogen line. - pdb_line(file=file, atom_num=atom_num+1, atom='H', res_num=res_num, res_name='GLY', vector=vectors[i]) + atom(file=file, serial=atom_num+1, name='H', res_seq=res_num, res_name='GLY', x=vectors[i][0], y=vectors[i][1], z=vectors[i][2]) # Increment the atom number and residue number. atom_num = atom_num + 2 @@ -115,8 +91,20 @@ used.append(vectors[i]) # Add a Trp indole NH for luck ;) -pdb_line(file=file, atom_num=atom_num, atom='NE1', res_num=res_num-1, res_name='GLY', vector=[0.0, 0.0, 0.0]) -pdb_line(file=file, atom_num=atom_num+1, atom='HE1', res_num=res_num-1, res_name='GLY', vector=[1/sqrt(3), 1/sqrt(3), 1/sqrt(3)]) +atom(file=file, serial=atom_num, name='NE1', res_seq=res_num-1, res_name='GLY', x=0.0, y=0.0, z=0.0) +atom(file=file, serial=atom_num+1, name='HE1', res_seq=res_num-1, res_name='GLY', x=1/sqrt(3), y=1/sqrt(3), z=1/sqrt(3)) + +# Add a TER record. +ter(file=file, serial=atom_num+2, res_name='GLY') + +# Connect everything. +atom_num = 1 +for i in range(len(vectors)): + conect(file=file, serial=atom_num, bonded1=atom_num+1) + conect(file=file, serial=atom_num+1, bonded1=atom_num) + atom_num = atom_num + 2 +conect(file=file, serial=atom_num, bonded1=atom_num+1) +conect(file=file, serial=atom_num+1, bonded1=atom_num) # End of PDB. file.write('END\n') Propchange: trunk/test_suite/shared_data/model_free/sphere/create_sphere.py ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Modified: trunk/test_suite/shared_data/model_free/sphere/sphere.pdb URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/model_free/sphere/sphere.pdb?rev=26597&r1=26596&r2=26597&view=diff ============================================================================== --- trunk/test_suite/shared_data/model_free/sphere/sphere.pdb (original) +++ trunk/test_suite/shared_data/model_free/sphere/sphere.pdb Mon Nov 17 12:04:25 2014 @@ -1,21 +1,42 @@ -ATOM 1 N GLY 1 0.000 0.000 0.000 1.00 0.00 -ATOM 2 H GLY 1 0.745 0.000 -0.667 1.00 0.00 -ATOM 3 N GLY 2 0.000 0.000 0.000 1.00 0.00 -ATOM 4 H GLY 2 -0.373 0.645 -0.667 1.00 0.00 -ATOM 5 N GLY 3 0.000 0.000 0.000 1.00 0.00 -ATOM 6 H GLY 3 -0.373 -0.645 -0.667 1.00 0.00 -ATOM 7 N GLY 4 0.000 0.000 0.000 1.00 0.00 -ATOM 8 H GLY 4 1.000 0.000 0.000 1.00 0.00 -ATOM 9 N GLY 5 0.000 0.000 0.000 1.00 0.00 -ATOM 10 H GLY 5 -0.500 0.866 0.000 1.00 0.00 -ATOM 11 N GLY 6 0.000 0.000 0.000 1.00 0.00 -ATOM 12 H GLY 6 -0.500 -0.866 0.000 1.00 0.00 -ATOM 13 N GLY 7 0.000 0.000 0.000 1.00 0.00 -ATOM 14 H GLY 7 0.745 0.000 0.667 1.00 0.00 -ATOM 15 N GLY 8 0.000 0.000 0.000 1.00 0.00 -ATOM 16 H GLY 8 -0.373 0.645 0.667 1.00 0.00 -ATOM 17 N GLY 9 0.000 0.000 0.000 1.00 0.00 -ATOM 18 H GLY 9 -0.373 -0.645 0.667 1.00 0.00 -ATOM 19 NE1 GLY 9 0.000 0.000 0.000 1.00 0.00 -ATOM 20 HE1 GLY 9 0.577 0.577 0.577 1.00 0.00 +ATOM 1 N GLY 1 0.000 0.000 0.000 1.00 0.00 +ATOM 2 H GLY 1 0.745 0.000 -0.667 1.00 0.00 +ATOM 3 N GLY 2 0.000 0.000 0.000 1.00 0.00 +ATOM 4 H GLY 2 -0.373 0.645 -0.667 1.00 0.00 +ATOM 5 N GLY 3 0.000 0.000 0.000 1.00 0.00 +ATOM 6 H GLY 3 -0.373 -0.645 -0.667 1.00 0.00 +ATOM 7 N GLY 4 0.000 0.000 0.000 1.00 0.00 +ATOM 8 H GLY 4 1.000 0.000 0.000 1.00 0.00 +ATOM 9 N GLY 5 0.000 0.000 0.000 1.00 0.00 +ATOM 10 H GLY 5 -0.500 0.866 0.000 1.00 0.00 +ATOM 11 N GLY 6 0.000 0.000 0.000 1.00 0.00 +ATOM 12 H GLY 6 -0.500 -0.866 0.000 1.00 0.00 +ATOM 13 N GLY 7 0.000 0.000 0.000 1.00 0.00 +ATOM 14 H GLY 7 0.745 0.000 0.667 1.00 0.00 +ATOM 15 N GLY 8 0.000 0.000 0.000 1.00 0.00 +ATOM 16 H GLY 8 -0.373 0.645 0.667 1.00 0.00 +ATOM 17 N GLY 9 0.000 0.000 0.000 1.00 0.00 +ATOM 18 H GLY 9 -0.373 -0.645 0.667 1.00 0.00 +ATOM 19 NE1 GLY 9 0.000 0.000 0.000 1.00 0.00 +ATOM 20 HE1 GLY 9 0.577 0.577 0.577 1.00 0.00 +TER 21 GLY +CONECT 1 2 +CONECT 2 1 +CONECT 3 4 +CONECT 4 3 +CONECT 5 6 +CONECT 6 5 +CONECT 7 8 +CONECT 8 7 +CONECT 9 10 +CONECT 10 9 +CONECT 11 12 +CONECT 12 11 +CONECT 13 14 +CONECT 14 13 +CONECT 15 16 +CONECT 16 15 +CONECT 17 18 +CONECT 18 17 +CONECT 19 20 +CONECT 20 19 END _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits