proteindf_tools.gauparam のソースコード

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2014 The ProteinDF development team.
# see also AUTHORS and README if provided.
#
# This file is a part of the ProteinDF software package.
#
# The ProteinDF is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The ProteinDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ProteinDF.  If not, see <http://www.gnu.org/licenses/>.

from .qmsim import QmSim


[ドキュメント] class GaussianParam(QmSim): """ Set the Gaussian calculation conditions. """ def __init__(self): self._data = {} self._init_gen_data() def _init_gen_data(self): self._gen_data = {} # DZ self._gen_data['DZ'] = {} self._gen_data['DZ']['H']= """ H 0 S 3 1.92406000E+01 3.28280000E-02 2.89920000E+00 2.31208000E-01 6.53400000E-01 8.17238000E-01 S 1 1.77600000E-01 1.00000000E+00 ****""" self._gen_data['DZ']['C'] = """ C 0 S 6 4232.61000000 0.00202900 634.88200000 0.01553500 146.09700000 0.07541100 42.49740000 0.25712100 14.18920000 0.59655500 1.96660000 0.24251700 S 1 5.14770000 1.00000000 S 1 0.49620000 1.00000000 S 1 0.15330000 1.00000000 P 4 18.15570000 0.01853400 3.98640000 0.11544200 1.14290000 0.38620600 0.35940000 0.64008900 P 1 0.11460000 1.00000000 ****""" self._gen_data['DZ']['N'] = """ N 0 S 6 5.90944000E+03 2.00400000E-03 8.87451000E+02 1.53100000E-02 2.04749000E+02 7.42930000E-02 5.98376000E+01 2.53364000E-01 1.99981000E+01 6.00576000E-01 2.68600000E+00 2.45111000E-01 S 1 7.19270000E+00 1.00000000E+00 S 1 7.00000000E-01 1.00000000E+00 S 1 2.13300000E-01 1.00000000E+00 P 4 2.67860000E+01 1.82570000E-02 5.95640000E+00 1.16407000E-01 1.70740000E+00 3.90111000E-01 5.31400000E-01 6.37221000E-01 P 1 1.65400000E-01 1.00000000E+00 ****""" self._gen_data['DZ']['O'] = """ O 0 S 6 7816.54000000 0.00203100 1175.82000000 0.01543600 273.18800000 0.07377100 81.16960000 0.24760600 27.18360000 0.61183200 3.41360000 0.24120500 S 1 9.53220000 1.00000000 S 1 0.93980000 1.00000000 S 1 0.28460000 1.00000000 P 4 35.18320000 0.01958000 7.90400000 0.12418900 2.30510000 0.39472700 0.71710000 0.62737500 P 1 0.21370000 1.00000000 ****""" # DZP self._gen_data['DZP'] = {} self._gen_data['DZP']['H'] = """ H 0 S 3 1.92406000E+01 3.28280000E-02 2.89920000E+00 2.31208000E-01 6.53400000E-01 8.17238000E-01 S 1 1.77600000E-01 1.00000000E+00 P 1 1.00000000E+00 1.00000000E+00 ****""" self._gen_data['DZP']['C'] = """ C 0 S 6 4232.61000000 0.00202900 634.88200000 0.01553500 146.09700000 0.07541100 42.49740000 0.25712100 14.18920000 0.59655500 1.96660000 0.24251700 S 1 5.14770000 1.00000000 S 1 0.49620000 1.00000000 S 1 0.15330000 1.00000000 P 4 18.15570000 0.01853400 3.98640000 0.11544200 1.14290000 0.38620600 0.35940000 0.64008900 P 1 0.11460000 1.00000000 D 1 0.75000000 1.00000000 ****""" self._gen_data['DZP']['N'] = """ N 0 S 6 5.90944000E+03 2.00400000E-03 8.87451000E+02 1.53100000E-02 2.04749000E+02 7.42930000E-02 5.98376000E+01 2.53364000E-01 1.99981000E+01 6.00576000E-01 2.68600000E+00 2.45111000E-01 S 1 7.19270000E+00 1.00000000E+00 S 1 7.00000000E-01 1.00000000E+00 S 1 2.13300000E-01 1.00000000E+00 P 4 2.67860000E+01 1.82570000E-02 5.95640000E+00 1.16407000E-01 1.70740000E+00 3.90111000E-01 5.31400000E-01 6.37221000E-01 P 1 1.65400000E-01 1.00000000E+00 D 1 8.00000000E-01 1.00000000E+00 ****""" self._gen_data['DZP']['O'] = """ O 0 S 6 7816.54000000 0.00203100 1175.82000000 0.01543600 273.18800000 0.07377100 81.16960000 0.24760600 27.18360000 0.61183200 3.41360000 0.24120500 S 1 9.53220000 1.00000000 S 1 0.93980000 1.00000000 S 1 0.28460000 1.00000000 P 4 35.18320000 0.01958000 7.90400000 0.12418900 2.30510000 0.39472700 0.71710000 0.62737500 P 1 0.21370000 1.00000000 D 1 0.85000000 1.00000000 ****""" self._gen_data['DZVP'] = {} self._gen_data['DZVP']['H'] = """ H 0 S 4 5.09991780E+01 9.66050000E-03 7.48321810E+00 7.37289000E-02 1.77746760E+00 2.95858100E-01 5.19329500E-01 7.15905300E-01 S 1 1.54110000E-01 1.00000000E+00 ****""" self._gen_data['DZVP']['C'] = """ C 0 S 6 2808.06450000 0.00201780 421.13828000 0.01543320 95.58661600 0.07558150 26.73900400 0.24782820 8.43282680 0.47937250 2.76058210 0.33383440 S 2 5.44700450 -0.07784080 0.47924220 0.56895600 S 1 0.14615650 1.00000000 P 4 18.13085200 0.01585470 4.09988320 0.09568280 1.18583700 0.30491190 0.36859740 0.49350160 P 1 0.10972000 1.00000000 D 1 0.60000000 1.00000000 ****""" self._gen_data['DZVP']['N'] = """ N 0 S 6 3.84541490E+03 2.01860000E-03 5.77533230E+02 1.54078000E-02 1.31319830E+02 7.53714000E-02 3.68237810E+01 2.48212200E-01 1.16701150E+01 4.79827400E-01 3.85426040E+00 3.31801200E-01 S 2 7.82956110E+00 -7.76669000E-02 6.87735100E-01 5.65459800E-01 S 1 2.04038800E-01 1.00000000E+00 P 4 2.68098410E+01 1.54663000E-02 6.06815400E+00 9.64397000E-02 1.76762560E+00 3.08361000E-01 5.46672700E-01 4.91159700E-01 P 1 1.58728900E-01 1.00000000E+00 D 1 7.00000000E-01 1.00000000E+00 ****""" self._gen_data['DZVP2'] = {} self._gen_data['DZVP2']['H'] = """ H 0 S 4 5.09991780E+01 9.66050000E-03 7.48321810E+00 7.37289000E-02 1.77746760E+00 2.95858100E-01 5.19329500E-01 7.15905300E-01 S 1 1.54110000E-01 1.00000000E+00 P 1 7.50000000E-01 1.00000000E+00 ****""" self._gen_data['DZVP2']['C'] = """ C 0 S 7 5784.15710000 0.00081900 869.30350000 0.00629350 198.51164000 0.03178120 56.42990100 0.11727340 18.28545700 0.30347630 6.44871460 0.45352140 2.34185960 0.24305910 S 2 5.45953280 -0.07780440 0.47819680 0.57149470 S 1 0.14573010 1.00000000 P 5 34.25856300 0.00580430 7.86389540 0.04064030 2.34451930 0.15502190 0.79617150 0.35314440 0.27268040 0.45500620 P 1 0.08926050 1.00000000 D 1 0.60000000 1.00000000 ****""" self._gen_data['DZVP2']['N'] = """ N 0 S 7 8.10417610E+03 7.96900000E-04 1.21731380E+03 6.12890000E-03 2.77739930E+02 3.10471000E-02 7.88475980E+01 1.15368200E-01 2.55371610E+01 3.02573800E-01 9.00457110E+00 4.55791300E-01 3.28352780E+00 2.43020800E-01 S 2 7.84935730E+00 -7.76364000E-02 6.86223900E-01 5.67981500E-01 S 1 2.03502600E-01 1.00000000E+00 P 5 4.90146080E+01 -5.90070000E-03 1.13166710E+01 -4.16444000E-02 3.40340530E+00 -1.61024900E-01 1.16111070E+00 -3.58353800E-01 3.95335800E-01 -4.48841500E-01 P 1 1.26898100E-01 1.00000000E+00 D 1 7.00000000E-01 1.00000000E+00 ****""" self._gen_data['DZVP2']['O'] = """ O 0 S 7 10814.40200000 0.00078090 1623.75320000 0.00601020 370.18274000 0.03052220 104.97475000 0.11400890 33.98442200 0.30195740 11.98431200 0.45711070 4.38597040 0.24324780 S 2 10.63003400 -0.07876540 0.93985260 0.57063030 S 1 0.27662130 1.00000000 P 5 61.54421800 0.00662380 14.27619400 0.04646420 4.33176790 0.17442290 1.47660430 0.36661150 0.49598570 0.43693610 P 1 0.15448360 1.00000000 D 1 0.80000000 1.00000000 ****""" self._gen_data['cc-pVDZ'] = {} self._gen_data['cc-pVDZ']['H'] = """ H 0 S 3 13.0100000 0.0196850 1.9620000 0.1379770 0.4446000 0.4781480 S 1 0.1220000 1.0000000 P 1 0.7270000 1.0000000 ****""" self._gen_data['cc-pVDZ']['C'] = """ C 0 S 8 6665.0000000 0.0006920 1000.0000000 0.0053290 228.0000000 0.0270770 64.7100000 0.1017180 21.0600000 0.2747400 7.4950000 0.4485640 2.7970000 0.2850740 0.5215000 0.0152040 S 8 6665.0000000 -0.0001460 1000.0000000 -0.0011540 228.0000000 -0.0057250 64.7100000 -0.0233120 21.0600000 -0.0639550 7.4950000 -0.1499810 2.7970000 -0.1272620 0.5215000 0.5445290 S 1 0.1596000 1.0000000 P 3 9.4390000 0.0381090 2.0020000 0.2094800 0.5456000 0.5085570 P 1 0.1517000 1.0000000 D 1 0.5500000 1.0000000 ****""" self._gen_data['cc-pVDZ']['N'] = """ N 0 S 8 9046.0000000 0.0007000 1357.0000000 0.0053890 309.3000000 0.0274060 87.7300000 0.1032070 28.5600000 0.2787230 10.2100000 0.4485400 3.8380000 0.2782380 0.7466000 0.0154400 S 8 9046.0000000 -0.0001530 1357.0000000 -0.0012080 309.3000000 -0.0059920 87.7300000 -0.0245440 28.5600000 -0.0674590 10.2100000 -0.1580780 3.8380000 -0.1218310 0.7466000 0.5490030 S 1 0.2248000 1.0000000 P 3 13.5500000 0.0399190 2.9170000 0.2171690 0.7973000 0.5103190 P 1 0.2185000 1.0000000 D 1 0.8170000 1.0000000 ****""" self._gen_data['cc-pVDZ']['O'] = """ O 0 S 8 11720.0000000 0.0007100 1759.0000000 0.0054700 400.8000000 0.0278370 113.7000000 0.1048000 37.0300000 0.2830620 13.2700000 0.4487190 5.0250000 0.2709520 1.0130000 0.0154580 S 8 11720.0000000 -0.0001600 1759.0000000 -0.0012630 400.8000000 -0.0062670 113.7000000 -0.0257160 37.0300000 -0.0709240 13.2700000 -0.1654110 5.0250000 -0.1169550 1.0130000 0.5573680 S 1 0.3023000 1.0000000 P 3 17.7000000 0.0430180 3.8540000 0.2289130 1.0460000 0.5087280 P 1 0.2753000 1.0000000 D 1 1.1850000 1.0000000 ****""" # title def _get_title(self): return self._data.get('title', '') def _set_title(self, title): self._data['title'] = str(title) title = property(_get_title, _set_title) # jobtype def _get_jobtype(self): return self._data.get('jobtype', 'sp') def _set_jobtype(self, jobtype): self._data['jobtype'] = str(jobtype) jobtype = property(_get_jobtype, _set_jobtype) # basisset def _get_basisset(self): return self._data.get('basisset', '6-31G') def _set_basisset(self, basisset): self._data['basisset'] = str(basisset) basisset = property(_get_basisset, _set_basisset) # ext_basisset for gen def _get_ext_basisset(self): return self._data.get('ext_basisset', '') def _set_ext_basisset(self, basisset): self._data['ext_basisset'] = str(basisset) ext_basisset = property(_get_ext_basisset, _set_ext_basisset) # charge def _get_charge(self): return self._data.get('charge', 0) def _set_charge(self, charge): self._data['charge'] = int(charge) charge = property(_get_charge, _set_charge) #
[ドキュメント] def get_inputfile_contents(self): data = '' data += "#P {method}/{basisset} {jobtype} \n".format( method = self.method, basisset = self.basisset, jobtype = self.jobtype ) data += "5D GFPrint GFInput NoSymm \n" data += "Integral(SG1Grid, BWeights, NoJEngine) NoRaff \n" data += "\n" data += "{title} \n".format(title = self.title) data += "\n" data += "{charge} 1 \n".format(charge = self.charge) data += self._get_inputfile_contents_geometry() if self.basisset == 'gen': data += self._get_inputfile_contents_basisset_gen() return data
def _get_inputfile_contents_geometry(self, atom_group = None): output = "" if (atom_group == None): output += self._get_inputfile_contents_geometry(self.molecule) else: for key, group in atom_group.groups(): output += self._get_inputfile_contents_geometry(group) for key, atom in atom_group.atoms(): output += "{} {} {} {}\n".format( atom.symbol, atom.xyz.x, atom.xyz.y, atom.xyz.z) return output def _get_inputfile_contents_basisset_gen(self): data = "" basisset_name = self.ext_basisset kinds = self.molecule.get_atom_kinds() for atom in kinds: data += self._gen_data[basisset_name][atom] data += "\n\n" return data