Package nMOLDYN :: Package Tests :: Package DISFG :: Module TestsContents
[hide private]
[frames] | no frames]

Source Code for Module nMOLDYN.Tests.DISFG.TestsContents

  1  #Details about the tests for DISFG. 
  2   
  3  #COULD NOT BE TESTED:  
  4  #       -weights -> only 'equal' and 'coherent' available now in 5.0.0. Always set to 'coherent' in 2.2.5 because if set to 'none', 2.2.5 switch to 'coherent'. 
  5  #       -units_q -> selectable via the GUI in 2.2.5 but does nothing actually. So, always set to '1/nm' in 5.0.0. 
  6  #       -atoms_pdb = nMOLDYN/Tests/REFERENCES/ProteinBPTI1.pdb -> NMOLDYN 2.2.5 DOES NOT CONSIDER CA MARKED ATOMS IN A PDB FILE 
  7  #       -atoms = {'Protein.0': ['Oxygen', 'SideChain', 'Nitrogen']} -> NMOLDYN 2.2.5 FINDS 46 ATOMS WHEREAS THE ACTUAL NUMBER IS 662 
  8  #       -atoms = {'Protein.0': ['BackBone', 'C_alpha']} -> NMOLDYN 2.2.5 FINDS 58 ATOMS WHEREAS THE ACTUAL NUMBER IS 347 
  9  #       -atoms = {'Protein.0': ['Methyl', 'SideChain', 'Carbon', 'C_alpha']} -> NMOLDYN 2.2.5 FINDS 286 WHEREAS THE ACTUAL NUMBER IS 661 
 10  from tempfile import mktemp 
 11  import os 
 12  from MMTK import Units 
 13   
 14  # TEMPLATES FOR REFERENCE AND NEW VERSIONS INPUT FILES. 
 15  template = {'REF' : {}, 'NEW' : {}} 
 16   
 17  template['REF']['title'] = 'Incoherent Scattering Function (Gaussian approx.)' 
 18  template['REF']['log_file'] = 'logfile.log' 
 19  template['REF']['output_files'] = {'fft' : 'DISFG_Sqw_test.nc', 'isf' : 'DISFG_Fqt_test.nc'} 
 20  template['REF']['units_frequency'] = 1/Units.ps 
 21  template['REF']['trajectory'] = ['../TrajectoryTest1.nc'] 
 22  template['REF']['weights'] = 'incoherent' 
 23  template['REF']['units_q'] = 1/Units.nm  
 24  template['REF']['frequency_points'] = 1000000 
 25   
 26   
 27  template['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc') 
 28  template['NEW']['weights'] = 'incoherent' 
 29  template['NEW']['disfg'] = mktemp(suffix = '_ISFG.nc', prefix = 'nMOLDYN_') 
 30  template['NEW']['pyroserver'] = 'monoprocessor' 
 31  template['NEW']['analysis'] = 'DynamicIncoherentStructureFactorGaussian_serial(self.testParameters)' 
 32   
 33  test = [] 
 34   
 35  # Test1 
 36  test.append({'REF' : {}, 'NEW' : {}}) 
 37  # PARAMETERS FOR REFERENCE VERSION. 
 38  test[-1]['REF']['time_info'] = (0, 49, 1) 
 39  test[-1]['REF']['atoms_pdb'] = '../TrajectoryTest1_1.pdb' 
 40  test[-1]['REF']['deuter'] = None 
 41  test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], 1.000000, 500, None)  
 42  test[-1]['REF']['ft_window'] = 80.0 
 43   
 44  # PARAMETERS FOR NEW VERSION. 
 45  test[-1]['NEW']['timeinfo'] = '1:49:1' 
 46  test[-1]['NEW']['subset'] = 'filename %s' % os.path.join(nmoldyn_package_path,"Tests",'TrajectoryTest1_1.nms') 
 47  test[-1]['NEW']['deuteration'] = None 
 48  test[-1]['NEW']['qShellValues'] = "3.:10.:1." 
 49  test[-1]['NEW']['fftWindow'] = 100./80.0 
 50   
 51   
 52  # Test2 
 53  test.append({'REF' : {}, 'NEW' : {}}) 
 54  # PARAMETERS FOR REFERENCE VERSION. 
 55  test[-1]['REF']['time_info'] = (0, 19, 1) 
 56  test[-1]['REF']['atoms'] = {'Protein.0': ["BackBone"]} 
 57  test[-1]['REF']['deuter'] = None 
 58  test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], 0.800000, 500, None)  
 59  test[-1]['REF']['ft_window'] = 10.0 
 60   
 61  # PARAMETERS FOR NEW VERSION. 
 62  test[-1]['NEW']['timeinfo'] = '1:19:1' 
 63  test[-1]['NEW']['subset'] = 'objectname P892 misc backbone' 
 64  test[-1]['NEW']['deuteration'] = None 
 65  test[-1]['NEW']['qShellValues'] = "3.:10.:1.0" 
 66  test[-1]['NEW']['fftWindow'] = 100./10.0 
 67   
 68   
 69  # Test3 
 70  test.append({'REF' : {}, 'NEW' : {}}) 
 71  # PARAMETERS FOR REFERENCE VERSION. 
 72  test[-1]['REF']['time_info'] = (0, 19, 2) 
 73  test[-1]['REF']['atoms'] = {'Protein.0': ['Methyl']} 
 74  test[-1]['REF']['deuter'] = None 
 75  test[-1]['REF']['q_vector_set'] = ([3.0, 5.0, 7.0, 9.0], 0.800000, 500, None)  
 76  test[-1]['REF']['ft_window'] = 20.0 
 77   
 78  # PARAMETERS FOR NEW VERSION. 
 79  test[-1]['NEW']['timeinfo'] = '1:19:2' 
 80  test[-1]['NEW']['subset'] = 'objectname P892 chemfragment methyl' 
 81  test[-1]['NEW']['deuteration'] = None 
 82  test[-1]['NEW']['qShellValues'] = "3.:9.:2.0" 
 83  test[-1]['NEW']['fftWindow'] = 100./20.0 
 84   
 85   
 86  # Test4 
 87  test.append({'REF' : {}, 'NEW' : {}}) 
 88  # PARAMETERS FOR REFERENCE VERSION. 
 89  test[-1]['REF']['time_info'] = (0, 9, 1) 
 90  test[-1]['REF']['atoms'] = {'Protein.0': ['Oxygen','Nitrogen']} 
 91  test[-1]['REF']['deuter'] = None 
 92  test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0], 1.200000, 500, None)  
 93  test[-1]['REF']['ft_window'] = 50.0 
 94   
 95  # PARAMETERS FOR NEW VERSION. 
 96  test[-1]['NEW']['timeinfo'] = '1:9:1' 
 97  test[-1]['NEW']['subset'] = 'objectname P892 atomelement nitrogen,oxygen' 
 98  test[-1]['NEW']['deuteration'] = None 
 99  test[-1]['NEW']['qShellValues'] = "4.:8.:1.0" 
100  test[-1]['NEW']['fftWindow'] = 100./50.0 
101   
102   
103  # Test5 
104  test.append({'REF' : {}, 'NEW' : {}}) 
105  # PARAMETERS FOR REFERENCE VERSION. 
106  test[-1]['REF']['time_info'] = (5, 29, 3) 
107  test[-1]['REF']['atoms'] = {'Protein.0': ['Hydrogen']} 
108  test[-1]['REF']['deuter'] = None 
109  test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0, 9.0], 0.900000, 500, None)  
110  test[-1]['REF']['ft_window'] = 10.0 
111   
112  # PARAMETERS FOR NEW VERSION. 
113  test[-1]['NEW']['timeinfo'] = '6:29:3' 
114  test[-1]['NEW']['subset'] = 'objectname P892 atomelement hydrogen' 
115  test[-1]['NEW']['deuteration'] = None 
116  test[-1]['NEW']['qShellValues'] = "4.:9.:1.0" 
117  test[-1]['NEW']['fftWindow'] = 100./10.0 
118   
119   
120  # Test6 
121  test.append({'REF' : {}, 'NEW' : {}}) 
122  # PARAMETERS FOR REFERENCE VERSION. 
123  test[-1]['REF']['time_info'] = (4, 23, 2) 
124  test[-1]['REF']['atoms'] = {'Protein.0': ['*']} 
125  test[-1]['REF']['deuter'] = {'Protein.0': ['Methyl']} 
126  test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 6.0, 7.0, 9.0], 1.00000, 500, None)  
127  test[-1]['REF']['ft_window'] = 40.0 
128   
129  # PARAMETERS FOR NEW VERSION. 
130  test[-1]['NEW']['timeinfo'] = '5:23:2' 
131  test[-1]['NEW']['subset'] = None 
132  test[-1]['NEW']['deuteration'] = 'objectname P892 chemfragment methyl' 
133  test[-1]['NEW']['qShellValues'] = [3.0, 4.0, 6.0, 7.0, 9.0] 
134  test[-1]['NEW']['fftWindow'] = 100./40.0 
135   
136   
137  # Test7 
138  test.append({'REF' : {}, 'NEW' : {}}) 
139  # PARAMETERS FOR REFERENCE VERSION. 
140  test[-1]['REF']['time_info'] = (0, 19, 1) 
141  test[-1]['REF']['atoms'] = {'Protein.0': ['Carbon']} 
142  test[-1]['REF']['deuter'] = None 
143  test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0], 0.500000, 500, None)  
144  test[-1]['REF']['ft_window'] = 80.0 
145   
146  # PARAMETERS FOR NEW VERSION. 
147  test[-1]['NEW']['timeinfo'] = '1:19:1' 
148  test[-1]['NEW']['subset'] = 'objectname P892 atomelement carbon' 
149  test[-1]['NEW']['deuteration'] = None 
150  test[-1]['NEW']['qShellValues'] = "4.:8.:1.0" 
151  test[-1]['NEW']['fftWindow'] = 100./80.0 
152   
153   
154  # Test8 
155  test.append({'REF' : {}, 'NEW' : {}}) 
156  # PARAMETERS FOR REFERENCE VERSION. 
157  test[-1]['REF']['time_info'] = (3, 39, 4) 
158  test[-1]['REF']['atoms'] = {'Protein.0': ['Sulfur']} 
159  test[-1]['REF']['deuter'] = None 
160  test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0], 1.800000, 500, None)  
161  test[-1]['REF']['ft_window'] = 10.0 
162   
163  # PARAMETERS FOR NEW VERSION. 
164  test[-1]['NEW']['timeinfo'] = '4:39:4' 
165  test[-1]['NEW']['subset'] = 'objectname P892 atomelement sulfur' 
166  test[-1]['NEW']['deuteration'] = None 
167  test[-1]['NEW']['qShellValues'] = "3.:6.:1.0" 
168  test[-1]['NEW']['fftWindow'] = 100./10.0 
169   
170   
171  # Test9 
172  test.append({'REF' : {}, 'NEW' : {}}) 
173  # PARAMETERS FOR REFERENCE VERSION. 
174  test[-1]['REF']['time_info'] = (0, 19, 1) 
175  test[-1]['REF']['atoms'] = {'Protein.0': ['SideChain']} 
176  test[-1]['REF']['deuter'] = {'Protein.0': ['Hydrogen']} 
177  test[-1]['REF']['q_vector_set'] = ([7.5, 8.5, 9.5], 0.800000, 500, None)  
178  test[-1]['REF']['ft_window'] = 20.0 
179   
180  # PARAMETERS FOR NEW VERSION. 
181  test[-1]['NEW']['timeinfo'] = '1:19:1' 
182  test[-1]['NEW']['subset'] = 'objectname P892 misc sidechains' 
183  test[-1]['NEW']['deuteration'] = 'objectname P892 atomelement hydrogen' 
184  test[-1]['NEW']['qShellValues'] = "7.5:9.5:1.0" 
185  test[-1]['NEW']['fftWindow'] = 100./20.0 
186   
187   
188  # Test10 
189  test.append({'REF' : {}, 'NEW' : {}}) 
190  # PARAMETERS FOR REFERENCE VERSION. 
191  test[-1]['REF']['time_info'] = (3, 30, 3) 
192  test[-1]['REF']['atoms'] = {'Protein.0': ['BackBone','SideChain']} 
193  test[-1]['REF']['deuter'] = None 
194  test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0], 1.500000, 500, None)  
195  test[-1]['REF']['ft_window'] = 25.0 
196   
197  # PARAMETERS FOR NEW VERSION. 
198  test[-1]['NEW']['timeinfo'] = '4:30:3' 
199  test[-1]['NEW']['subset'] = 'objectname P892 misc backbone,sidechains' 
200  test[-1]['NEW']['deuteration'] = None 
201  test[-1]['NEW']['qShellValues'] = "3.:7.:1.0" 
202  test[-1]['NEW']['fftWindow'] = 100./25.0 
203   
204   
205  # Test11 
206  test.append({'REF' : {}, 'NEW' : {}}) 
207  # PARAMETERS FOR REFERENCE VERSION. 
208  test[-1]['REF']['trajectory'] = ['../TrajectoryTest3.nc'] 
209  test[-1]['REF']['time_info'] = (5, 19, 2) 
210  test[-1]['REF']['atoms'] = {'Water': ['Hydrogen']} 
211  test[-1]['REF']['deuter'] = None 
212  test[-1]['REF']['q_vector_set'] = ([5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0], 1.000000, 500, None)  
213  test[-1]['REF']['ft_window'] = 10.0 
214   
215  # PARAMETERS FOR NEW VERSION. 
216  test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest3.nc') 
217  test[-1]['NEW']['timeinfo'] = '6:19:2' 
218  test[-1]['NEW']['subset'] = 'objectname AC3 atomelement hydrogen' 
219  test[-1]['NEW']['deuteration'] = None 
220  test[-1]['NEW']['qShellValues'] = "5.:12.:1.0" 
221  test[-1]['NEW']['fftWindow'] = 100./10.0 
222   
223   
224  # Test12 
225  test.append({'REF' : {}, 'NEW' : {}}) 
226  # PARAMETERS FOR REFERENCE VERSION. 
227  test[-1]['REF']['trajectory'] = ['../TrajectoryTest3.nc'] 
228  test[-1]['REF']['time_info'] = (0, 19, 1) 
229  test[-1]['REF']['atoms'] = {'Water': ['Oxygen', 'Hydrogen']} 
230  test[-1]['REF']['deuter'] = {'Water': ['Hydrogen']} 
231  test[-1]['REF']['q_vector_set'] = ([5.6, 6.4, 7.3, 10.5, 20.4], 0.600000, 500, None)  
232  test[-1]['REF']['ft_window'] = 8.0 
233   
234  # PARAMETERS FOR NEW VERSION. 
235  test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest3.nc') 
236  test[-1]['NEW']['timeinfo'] = '1:19:1' 
237  test[-1]['NEW']['subset'] = 'objectname AC3 atomelement hydrogen,oxygen' 
238  test[-1]['NEW']['deuteration'] = 'objectname AC3 atomelement hydrogen' 
239  test[-1]['NEW']['qShellValues'] = (5.6, 6.4, 7.3, 10.5, 20.4) 
240  test[-1]['NEW']['fftWindow'] = 100./8.0 
241