![]() ![]() append ( '' ) if isinstance ( addsec, str ): out. format ( key, val )) return out def _format_addsec ( addsec ): '''Format addsec string as a list of lines to be added to the gaussian input file.''' out = if addsec is not None : out. strip ( '(' ) # Then attach the properties appropriately # this formatting was chosen for backwards compatibility reasons, but # it would probably be better to # 1) Ensure proper spacing between entries with explicit spaces # 2) Use fewer columns for the element # 3) Use 'e' (scientific notation) instead of 'f' for positions molecule_spec. strip ( ', ' ) symbol_section += ')' else : symbol_section = symbol_section. mass ) symbol_section += string if nuclear_props_set or mass_set : symbol_section = symbol_section. mass : mass_set = True string = 'iso' + '=' + str ( atoms. ![]() symbol expected_mass = atomic_masses_iupac2016 if expected_mass != atoms. items (): if array is not None and array is not None : string = keyword + '=' + str ( array ) + ', ' symbol_section += string nuclear_props_set = True # Check whether the mass of the atom has been modified, # and if so, add it to the symbol section: mass_set = False symbol = atom. nuclear_props_set = False for keyword, array in nuclear_props. symbol + '(' # Check whether any nuclear properties of the atom have been set, # and if so, add them to the symbol section. tpss = 'tpsstpss', revtpss = 'revtpssrevtpss', ) _nuclear_prop_names = def _get_molecule_spec ( atoms, nuclear_props ): ''' Generate the molecule specification section to write to the Gaussian input file, from the Atoms object and dict of nuclear properties''' molecule_spec = for i, atom in enumerate ( atoms ): symbol_section = atom. _problem_methods = _xc_to_method = dict ( pbe = 'pbepbe', pbe0 = 'pbe1pbe', hse06 = 'hseh1pbe', hse03 = 'ohse2pbe', lda = 'svwn', # gaussian "knows about" LSDA, but maybe not LDA. In addition, the "energy" calculated # by these methods are typically ZPVE corrected and/or temperature dependent # free energies. ![]() Import re import warnings from collections.abc import Iterable from copy import deepcopy import numpy as np from ase import Atoms from import InputError, Calculator from import Gaussian from import SinglePointCalculator from ase.data import atomic_masses_iupac2016, chemical_symbols from ase.io import ParseError from ase.io.zmatrix import parse_zmatrix from ase.units import Bohr, Hartree _link0_keys = _link0_special = # Certain problematic methods do not provide well-defined potential energy # surfaces, because these "composite" methods involve geometry optimization # and/or vibrational frequency analysis. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |