proteindf_tools package

class proteindf_tools.Basis2(basis2_path='')[source]

Bases: object

read ProteinDF basis2 file

>>> bs2 = Basis2("data/basis2.sample")
>>> print(bs2.get_basis2())
O-CARBON (621/41) by FS
 3 2 0 0 0 0 0 0 0 0 0
 6
     2.808064e+03  2.017830e-03
     4.211383e+02  1.543320e-02
     9.558662e+01  7.558155e-02
     2.673900e+01  2.478282e-01
     8.432827e+00  4.793725e-01
     2.760582e+00  3.338344e-01
 2
     5.447004e+00 -7.784077e-02
     4.792422e-01  5.689560e-01
 1
     1.461565e-01  1.000000e+00
 4
     1.813085e+01  1.585473e-02
     4.099883e+00  9.568277e-02
     1.185837e+00  3.049119e-01
     3.685974e-01  4.935017e-01
 1
     1.097200e-01  1.000000e+00

A-CARBON (7/2;7/2) by FS
 7 2 0 0 0 0 0 0 0 0 0
 1
     3.467611e+02  1.000000e+00
 1
     7.966888e+01  1.000000e+00
 1
     2.201073e+01  1.000000e+00
 1
     6.473901e+00  1.000000e+00
 1
     2.508147e+00  1.000000e+00
 1
     7.781041e-01  1.000000e+00
 1
     2.288027e-01  1.000000e+00
 1
     2.508147e+00  1.000000e+00
 1
     2.288027e-01  1.000000e+00
A-CARBON (7/2;7/2) by FS
 7 2 0 0 0 0 0 0 0 0 0
 1
     1.160000e+02  1.000000e+00
 1
     2.655629e+01  1.000000e+00
 1
     7.336909e+00  1.000000e+00
 1
     2.157967e+00  1.000000e+00
 1
     8.360489e-01  1.000000e+00
 1
     2.593680e-01  1.000000e+00
 1
     7.626760e-02  1.000000e+00
 1
     8.360489e-01  1.000000e+00
 1
     7.626760e-02  1.000000e+00

get_basis2()[source]
get_basisset(name)[source]
get_basisset_j(name)[source]
get_basisset_xc(name)[source]
class proteindf_tools.BasisSet(*args, **kwargs)[source]

Bases: list

>>> bs = BasisSet('sample', 3)
>>> bs.name
'sample'
>>> len(bs)
3
>>> bs[0] = ContractedGTO('p', 3)
>>> bs[0][0] = PrimitiveGTO(2.80806400E+03, 2.01783000E-03)
>>> bs[0][1] = PrimitiveGTO(4.21138300E+02, 1.54332000E-02)
>>> bs[0][2] = PrimitiveGTO(9.55866200E+01, 7.55815500E-02)
expand()[source]

Expand the case where shell_type is e.g. ‘spd’.

get_basis2()[source]
get_num_of_CGTOs(shell_type)[source]
get_number_of_AOs()[source]
get_raw_data()[source]
property max_shell_type
property max_shell_type_id
property name
set_by_raw_data(odict)[source]
sort()[source]

Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.

class proteindf_tools.ContractedGTO(*args, **kwargs)[source]

Bases: list

>>> cgto = ContractedGTO('p', 3)
>>> cgto[0] = PrimitiveGTO(2.80806400E+03, 2.01783000E-03)
>>> cgto[1] = PrimitiveGTO(4.21138300E+02, 1.54332000E-02)
>>> cgto[2] = PrimitiveGTO(9.55866200E+01, 7.55815500E-02)
>>> cgto.shell_type
'p'
>>> len(cgto)
3
expand()[source]

Expand the case where shell_type is e.g. ‘spd’.

classmethod get_basis_type(shell_type_id, basis_id)[source]

Return the orbital type string. shell_type_id=0, basis_id=0: s shell_type_id=1, basis_id=0: px shell_type_id=1, basis_id=1: py shell_type_id=1, basis_id=2: pz shell_type_id=2, basis_id=0: dxy shell_type_id=2, basis_id=1: dyz shell_type_id=2, basis_id=2: dzx shell_type_id=2, basis_id=3: dxx-yy shell_type_id=2, basis_id=4: dzz

get_raw_data()[source]
classmethod get_shell_type(id)[source]
classmethod get_shell_type_id(shell_type)[source]

Return the id corresponding to shell_type.

s: 0, p: 1, d: 2

classmethod get_supported_shell_types()[source]
normalize()[source]
property scale_factor
set_by_raw_data(odict)[source]
property shell_type
property shell_type_id
class proteindf_tools.GaussianParam[source]

Bases: QmSim

Set the Gaussian calculation conditions.

property basisset
property charge
property ext_basisset
get_inputfile_contents()[source]
property jobtype
property title
class proteindf_tools.Matrix(*args, **kwargs)[source]

Bases: Matrix

classmethod find_header_struct(file_path)[source]
classmethod get_size(file_path)[source]
classmethod is_loadable(file_path)[source]
load(file_path)[source]

Load the matrix. True is returned if the reading is successful.

save(file_path, matrix_type=1)[source]
class proteindf_tools.OrbInfo(obj=None)[source]

Bases: object

Manage orbital information.

get_atom(orb_index)[source]
get_atom_id(orb_index)[source]
get_basis_type(orb_index)[source]
get_num_of_orbitals()[source]
get_shell_type(orb_index)[source]
class proteindf_tools.PdfParam(rhs=None)[source]

Bases: PdfParamObject

class proteindf_tools.PdfSim(*args, **kwargs)[source]

Bases: object

numerical_grad(pdfparam, workdir='.', accuracy=0.001, delta=0.001)[source]
opt(pdfparam, workdir='.', max_cycle=100)[source]
pop(iteration=-1, *args, **kwargs)[source]

calc population

setup(pdfparam=None, workdir='.')[source]

setup to run ProteinDF

sp(pdfparam, *args, **kwargs)[source]

calc single-point

Keyword arguments: pdfparam — PdfParam object represented the calculation condition. workdir — working directory. db_path — ProteinDF ArchiveDB path (default: pdfresults.db) dry_run — if True, the calculation is NOT carried out. Default is False.

Returns: tuple of the number of iterations and the total energy.

total_energy(pdfparam, workdir='.')[source]
class proteindf_tools.PopEspUtils[source]

Bases: PopUtils

Population Utilities for ESP

get_RRMS(mpac_path, atoms)[source]
class proteindf_tools.PopUtils[source]

Bases: object

Population Utilities

static get_atomlist_by_param(param_path)[source]
static set_atomlist(atom_charges, atomlist)[source]

substitute atom_charges for atomlist

class proteindf_tools.PrimitiveGTO(*args, **kwargs)[source]

Bases: object

>>> pgto = PrimitiveGTO(2.80806400E+03, 2.01783000E-03)
>>> math.fabs(pgto.exp - 2.80806400E+03) < 1.0E-15
True
>>> math.fabs(pgto.coef - 2.01783000E-03) < 1.0E-15
True
property coef
property exp
get_raw_data()[source]
normalize(shell_type)[source]
set_by_raw_data(odict)[source]
class proteindf_tools.QmSim[source]

Bases: object

Base class for QmSimulator.

property method
class proteindf_tools.SymmetricMatrix(*args, **kwargs)[source]

Bases: SymmetricMatrix

classmethod find_header_struct(file_path)[source]
classmethod get_size(file_path)[source]
classmethod is_loadable(file_path)[source]
load(file_path)[source]
save(file_path, is_little_endian=True)[source]
class proteindf_tools.Vector(obj=[])[source]

Bases: Vector

classmethod find_header_struct(file_path)[source]
classmethod is_loadable(file_path)[source]
load(file_path)[source]

Load the vector. True is returned if the reading is successful.

save(file_path)[source]

Submodules