Beispiel #1
0
    def test_as_dict(self):
        """Test the as_dict() method of ARC"""
        spc1 = ARCSpecies(label='spc1', smiles=str('CC'), generate_thermo=False)
        arc0 = ARC(project='arc_test', job_types=self.job_types1, initial_trsh='scf=(NDump=30)',
                   arc_species_list=[spc1], level_of_theory='ccsd(t)-f12/cc-pvdz-f12//b3lyp/6-311+g(3df,2p)')
        restart_dict = arc0.as_dict()
        expected_dict = {'composite_method': '',
                         'conformer_level': 'b3lyp/6-31g(d,p) empiricaldispersion=gd3bj',
                         'ts_guess_level': 'b3lyp/6-31g(d,p) empiricaldispersion=gd3bj',
                         'opt_level': 'b3lyp/6-311+g(3df,2p)',
                         'freq_level': 'b3lyp/6-311+g(3df,2p)',
                         'freq_scale_factor': 0.967,
                         'initial_trsh': 'scf=(NDump=30)',
                         'max_job_time': 120,
                         'model_chemistry': 'ccsd(t)-f12/cc-pvdz-f12//b3lyp/6-311+g(3df,2p)',
                         'output': {},
                         'project': 'arc_test',
                         'running_jobs': {},
                         'reactions': [],
                         'scan_level': '',
                         'sp_level': 'ccsd(t)-f12/cc-pvdz-f12',
                         'job_memory': 14,
                         'job_types': {'1d_rotors': False,
                                       'conformers': True,
                                       'fine': False,
                                       'freq': True,
                                       'onedmin': False,
                                       'opt': True,
                                       'orbitals': False,
                                       'sp': True},

                         't_min': None,
                         't_max': None,
                         't_count': None,
                         'use_bac': True,
                         'confs_to_dft': 5,
                         'allow_nonisomorphic_2d': False,
                         'calc_freq_factor': True,
                         'ess_settings': {'gaussian': ['local', 'server2'], 'onedmin': ['server1'],
                                          'molpro': ['server2'], 'qchem': ['server1']},
                         'species': [{'bond_corrections': {'C-C': 1, 'C-H': 6},
                                      'arkane_file': None,
                                      'E0': None,
                                      'charge': 0,
                                      'external_symmetry': None,
                                      'optical_isomers': None,
                                      'generate_thermo': False,
                                      'is_ts': False,
                                      'label': 'spc1',
                                      'long_thermo_description': "Bond corrections: {'C-C': 1, 'C-H': 6}\n",
                                      'mol': '1 C u0 p0 c0 {2,S} {3,S} {4,S} {5,S}\n2 C u0 p0 c0 {1,S} {6,S} {7,S} {8,S}\n3 H u0 p0 c0 {1,S}\n4 H u0 p0 c0 {1,S}\n5 H u0 p0 c0 {1,S}\n6 H u0 p0 c0 {2,S}\n7 H u0 p0 c0 {2,S}\n8 H u0 p0 c0 {2,S}\n',
                                      'multiplicity': 1,
                                      'neg_freqs_trshed': [],
                                      'number_of_rotors': 0,
                                      'rotors_dict': {},
                                      'force_field': 'MMFF94',
                                      't1': None}],
                         }
        self.assertEqual(restart_dict, expected_dict)
Beispiel #2
0
 def test_as_dict(self):
     """Test the as_dict() method of ARC"""
     self.maxDiff = None
     ess_settings = {}
     spc1 = ARCSpecies(label='spc1', smiles=str('CC'), generate_thermo=False)
     arc0 = ARC(project='arc_test', ess_settings=ess_settings, scan_rotors=False, initial_trsh='scf=(NDump=30)',
                arc_species_list=[spc1])
     restart_dict = arc0.as_dict()
     expected_dict = {'composite_method': '',
                      'conformer_level': 'b97-d3/6-311+g(d,p)',
                      'ts_guess_level': 'b3lyp/6-31+g(d,p)',
                      'ess_settings': {'ssh': True},
                      'fine': True,
                      'opt_level': 'wb97xd/6-311++g(d,p)',
                      'freq_level': 'wb97xd/6-311++g(d,p)',
                      'generate_conformers': True,
                      'initial_trsh': 'scf=(NDump=30)',
                      'max_job_time': 120,
                      'model_chemistry': 'ccsd(t)-f12/cc-pvtz-f12',
                      'output': {},
                      'project': 'arc_test',
                      'running_jobs': {},
                      'reactions': [],
                      'scan_level': '',
                      'scan_rotors': False,
                      'sp_level': 'ccsd(t)-f12/cc-pvtz-f12',
                      't_min': None,
                      't_max': None,
                      't_count': None,
                      'use_bac': True,
                      'visualize_orbitals': True,
                      'allow_nonisomorphic_2d': False,
                      'species': [{'bond_corrections': {'C-C': 1, 'C-H': 6},
                                   'arkane_file': None,
                                   'E0': None,
                                   'charge': 0,
                                   'external_symmetry': None,
                                   'optical_isomers': None,
                                   'final_xyz': '',
                                   'generate_thermo': False,
                                   'is_ts': False,
                                   'label': u'spc1',
                                   'long_thermo_description': "Bond corrections: {'C-C': 1, 'C-H': 6}\n",
                                   'mol': '1 C u0 p0 c0 {2,S} {3,S} {4,S} {5,S}\n2 C u0 p0 c0 {1,S} {6,S} {7,S} {8,S}\n3 H u0 p0 c0 {1,S}\n4 H u0 p0 c0 {1,S}\n5 H u0 p0 c0 {1,S}\n6 H u0 p0 c0 {2,S}\n7 H u0 p0 c0 {2,S}\n8 H u0 p0 c0 {2,S}\n',
                                   'multiplicity': 1,
                                   'neg_freqs_trshed': [],
                                   'number_of_rotors': 0,
                                   'rotors_dict': {},
                                   't1': None}],
                      }
     self.assertEqual(restart_dict, expected_dict)
Beispiel #3
0
 def test_as_dict(self):
     """Test the as_dict() method of ARC"""
     spc1 = ARCSpecies(
         label='spc1',
         smiles='CC',
         compute_thermo=False,
     )
     arc0 = ARC(
         project='arc_test',
         job_types=self.job_types1,
         species=[spc1],
         level_of_theory='ccsd(t)-f12/cc-pvdz-f12//b3lyp/6-311+g(3df,2p)',
         three_params=False,
     )
     arc0.freq_level.args['keyword']['general'] = 'scf=(NDump=30)'
     restart_dict = arc0.as_dict()
     long_thermo_description = restart_dict['species'][0][
         'long_thermo_description']
     self.assertIn('Bond corrections:', long_thermo_description)
     self.assertIn("'C-C': 1", long_thermo_description)
     self.assertIn("'C-H': 6", long_thermo_description)
     expected_dict = {
         'T_count':
         50,
         'T_max':
         None,
         'T_min':
         None,
         'allow_nonisomorphic_2d':
         False,
         'arkane_level_of_theory': {
             'basis': 'cc-pvdz-f12',
             'method': 'ccsd(t)-f12',
             'method_type': 'wavefunction',
             'software': 'molpro'
         },
         'calc_freq_factor':
         True,
         'compute_transport':
         False,
         'conformer_level': {
             'basis': 'def2svp',
             'compatible_ess': ['gaussian', 'terachem'],
             'method': 'wb97xd',
             'method_type': 'dft',
             'software': 'gaussian'
         },
         'e_confs':
         5.0,
         'ess_settings': {
             'gaussian': ['local', 'server2'],
             'molpro': ['server2'],
             'onedmin': ['server1'],
             'orca': ['local'],
             'qchem': ['server1'],
             'terachem': ['server1']
         },
         'freq_level': {
             'basis': '6-311+g(3df,2p)',
             'method': 'b3lyp',
             'method_type': 'dft',
             'software': 'gaussian'
         },
         'freq_scale_factor':
         0.967,
         'irc_level': {
             'basis': 'def2tzvp',
             'compatible_ess': ['gaussian', 'terachem'],
             'method': 'wb97xd',
             'method_type': 'dft',
             'software': 'gaussian'
         },
         'job_memory':
         14,
         'job_types': {
             'bde': True,
             'conformers': True,
             'fine': False,
             'freq': True,
             'irc': True,
             'onedmin': False,
             'opt': True,
             'orbitals': False,
             'rotors': False,
             'sp': True
         },
         'kinetics_adapter':
         'Arkane',
         'max_job_time':
         120,
         'n_confs':
         10,
         'opt_level': {
             'basis': '6-311+g(3df,2p)',
             'method': 'b3lyp',
             'method_type': 'dft',
             'software': 'gaussian'
         },
         'output': {},
         'project':
         'arc_test',
         'reactions': [],
         'running_jobs': {},
         'sp_level': {
             'basis': 'cc-pvdz-f12',
             'method': 'ccsd(t)-f12',
             'method_type': 'wavefunction',
             'software': 'molpro'
         },
         'species': [{
             'arkane_file':
             None,
             'bond_corrections': {
                 'C-C': 1,
                 'C-H': 6
             },
             'charge':
             0,
             'compute_thermo':
             False,
             'consider_all_diastereomers':
             True,
             'force_field':
             'MMFF94s',
             'is_ts':
             False,
             'label':
             'spc1',
             'long_thermo_description':
             long_thermo_description,
             'mol':
             '1 C u0 p0 c0 {2,S} {3,S} {4,S} {5,S}\n'
             '2 C u0 p0 c0 {1,S} {6,S} {7,S} {8,S}\n'
             '3 H u0 p0 c0 {1,S}\n'
             '4 H u0 p0 c0 {1,S}\n'
             '5 H u0 p0 c0 {1,S}\n'
             '6 H u0 p0 c0 {2,S}\n'
             '7 H u0 p0 c0 {2,S}\n'
             '8 H u0 p0 c0 {2,S}\n',
             'multiplicity':
             1,
             'number_of_rotors':
             0
         }],
         'thermo_adapter':
         'Arkane',
         'three_params':
         False
     }
     # import pprint  # left intentionally for debugging
     # print(pprint.pprint(restart_dict))
     self.assertEqual(restart_dict, expected_dict)