示例#1
0
def tau(prefix):
    """ construct the tau filesystem (2 layers)

    locators:
        0 - []
                files:
                - vmatrix
                - info
                - trajectory
        0 - [tid]
                files:
                - geometry_info
                - gradient_info
                - hessian_info
                - geometry_input
                - gradient_input
                - hessian_input
                - energy
                - geometry
                - zmatrix
                - gradient
                - hessian
                - harmonic_frequencies

    :param prefix: sets the path where this filesystem will sit
    :type prefix: str
    """
    trunk_ds = data_series.tau_trunk(prefix)
    leaf_ds = data_series.tau_leaf(prefix, root_ds=trunk_ds)

    vma_dfile = data_files.vmatrix(_FilePrefix.TAU)
    inf_dfile = data_files.information(_FilePrefix.TAU,
                                       function=info_objects.tau_trunk)
    traj_dfile = data_files.trajectory(_FilePrefix.TAU)
    trunk_ds.add_data_files({
        _FileAttributeName.VMATRIX: vma_dfile,
        _FileAttributeName.INFO: inf_dfile,
        _FileAttributeName.TRAJ: traj_dfile
    })

    geom_inf_dfile = data_files.information(_FilePrefix.GEOM,
                                            function=info_objects.run)
    grad_inf_dfile = data_files.information(_FilePrefix.GRAD,
                                            function=info_objects.run)
    hess_inf_dfile = data_files.information(_FilePrefix.HESS,
                                            function=info_objects.run)
    geom_inp_dfile = data_files.input_file(_FilePrefix.GEOM)
    grad_inp_dfile = data_files.input_file(_FilePrefix.GRAD)
    hess_inp_dfile = data_files.input_file(_FilePrefix.HESS)
    ene_dfile = data_files.energy(_FilePrefix.GEOM)
    geom_dfile = data_files.geometry(_FilePrefix.GEOM)
    zmat_dfile = data_files.zmatrix(_FilePrefix.GEOM)
    grad_dfile = data_files.gradient(_FilePrefix.GRAD)
    hess_dfile = data_files.hessian(_FilePrefix.HESS)
    hfreq_dfile = data_files.harmonic_frequencies(_FilePrefix.HESS)
    leaf_ds.add_data_files({
        _FileAttributeName.GEOM_INFO: geom_inf_dfile,
        _FileAttributeName.GRAD_INFO: grad_inf_dfile,
        _FileAttributeName.HESS_INFO: hess_inf_dfile,
        _FileAttributeName.GEOM_INPUT: geom_inp_dfile,
        _FileAttributeName.GRAD_INPUT: grad_inp_dfile,
        _FileAttributeName.HESS_INPUT: hess_inp_dfile,
        _FileAttributeName.ENERGY: ene_dfile,
        _FileAttributeName.GEOM: geom_dfile,
        _FileAttributeName.ZMAT: zmat_dfile,
        _FileAttributeName.GRAD: grad_dfile,
        _FileAttributeName.HESS: hess_dfile,
        _FileAttributeName.HFREQ: hfreq_dfile
    })

    geom_inf_jobj = json_objects.information(_FilePrefix.GEOM,
                                             function=info_objects.run)
    grad_inf_jobj = json_objects.information(_FilePrefix.GRAD,
                                             function=info_objects.run)
    hess_inf_jobj = json_objects.information(_FilePrefix.HESS,
                                             function=info_objects.run)
    geom_inp_jobj = json_objects.input_file(_FilePrefix.GEOM)
    grad_inp_jobj = json_objects.input_file(_FilePrefix.GRAD)
    hess_inp_jobj = json_objects.input_file(_FilePrefix.HESS)
    ene_jobj = json_objects.energy(_FilePrefix.GEOM)
    geom_jobj = json_objects.geometry(_FilePrefix.GEOM)
    zmat_jobj = json_objects.zmatrix(_FilePrefix.GEOM)
    grad_jobj = json_objects.gradient(_FilePrefix.GRAD)
    hess_jobj = json_objects.hessian(_FilePrefix.HESS)
    hfreq_jobj = json_objects.harmonic_frequencies(_FilePrefix.HESS)

    leaf_ds.add_json_entries({
        _JSONAttributeName.GEOM_INFO: geom_inf_jobj,
        _JSONAttributeName.GRAD_INFO: grad_inf_jobj,
        _JSONAttributeName.HESS_INFO: hess_inf_jobj,
        _JSONAttributeName.GEOM_INPUT: geom_inp_jobj,
        _JSONAttributeName.GRAD_INPUT: grad_inp_jobj,
        _JSONAttributeName.HESS_INPUT: hess_inp_jobj,
        _JSONAttributeName.ENERGY: ene_jobj,
        _JSONAttributeName.GEOM: geom_jobj,
        _JSONAttributeName.ZMAT: zmat_jobj,
        _JSONAttributeName.GRAD: grad_jobj,
        _JSONAttributeName.HESS: hess_jobj,
        _JSONAttributeName.HFREQ: hfreq_jobj
    })

    return (trunk_ds, leaf_ds)
示例#2
0
def cscan(prefix):
    """ Create a constrained scan (c-scan) file system manager for a given path.

    Layers:
        [0] The c-scan "trunk" layer.
            Specifiers:
            []

            (no files)

            Generated by :meth:`autofile.schema.data_series.cscan_trunk`

        [1] The first c-scan "branch" layer.
            Specifiers:
            [Constraints]

            Files:
                - info
                - trajectory

            Generated by :meth:`autofile.schema.data_series.cscan_branch1`

        [2] The second c-scan "branch" layer.
            Specifiers:
            [Constraints, Scan Coordinate Names]

            (no files)

            Generated by :meth:`autofile.schema.data_series.cscan_branch2`

        [3] The c-scan "leaf" layer.
            Specifiers:
            [Constraints, Scan Coordinate Names, Scan Coordinate Values]

            Files:
                - geometry_info
                - gradient_info
                - hessian_info
                - geometry_input
                - gradient_input
                - hessian_input
                - energy
                - geometry
                - zmatrix
                - gradient
                - hessian
                - harmonic_frequencies

            Generated by :meth:`autofile.schema.data_series.cscan_leaf`


    :param prefix: Path to where the file system will be created
    :type prefix: str
    :returns: A tuple of DataSeries objects. Each item in this tuple manages a
        different layer in the file system, as described above.
    """
    trunk_ds = data_series.cscan_trunk(prefix)
    branch1_ds = data_series.cscan_branch1(prefix, root_ds=trunk_ds)
    branch2_ds = data_series.cscan_branch2(prefix, root_ds=branch1_ds)
    leaf_ds = data_series.cscan_leaf(prefix, root_ds=branch2_ds)

    inf_dfile = data_files.information(_FilePrefix.SCAN,
                                       function=info_objects.scan_branch)
    traj_dfile = data_files.trajectory(_FilePrefix.SCAN)

    branch1_ds.add_data_files({
        _FileAttributeName.INFO: inf_dfile,
        _FileAttributeName.TRAJ: traj_dfile
    })

    geom_inf_dfile = data_files.information(_FilePrefix.GEOM,
                                            function=info_objects.run)
    grad_inf_dfile = data_files.information(_FilePrefix.GRAD,
                                            function=info_objects.run)
    hess_inf_dfile = data_files.information(_FilePrefix.HESS,
                                            function=info_objects.run)
    geom_inp_dfile = data_files.input_file(_FilePrefix.GEOM)
    grad_inp_dfile = data_files.input_file(_FilePrefix.GRAD)
    hess_inp_dfile = data_files.input_file(_FilePrefix.HESS)
    ene_dfile = data_files.energy(_FilePrefix.GEOM)
    geom_dfile = data_files.geometry(_FilePrefix.GEOM)
    zmat_dfile = data_files.zmatrix(_FilePrefix.GEOM)
    grad_dfile = data_files.gradient(_FilePrefix.GRAD)
    hess_dfile = data_files.hessian(_FilePrefix.HESS)
    hfreq_dfile = data_files.harmonic_frequencies(_FilePrefix.HESS)
    leaf_ds.add_data_files({
        _FileAttributeName.GEOM_INFO: geom_inf_dfile,
        _FileAttributeName.GRAD_INFO: grad_inf_dfile,
        _FileAttributeName.HESS_INFO: hess_inf_dfile,
        _FileAttributeName.GEOM_INPUT: geom_inp_dfile,
        _FileAttributeName.GRAD_INPUT: grad_inp_dfile,
        _FileAttributeName.HESS_INPUT: hess_inp_dfile,
        _FileAttributeName.ENERGY: ene_dfile,
        _FileAttributeName.GEOM: geom_dfile,
        _FileAttributeName.ZMAT: zmat_dfile,
        _FileAttributeName.GRAD: grad_dfile,
        _FileAttributeName.HESS: hess_dfile,
        _FileAttributeName.HFREQ: hfreq_dfile
    })

    return (trunk_ds, branch1_ds, branch2_ds, leaf_ds)
示例#3
0
def conformer(prefix):
    """ Create a conformer file system manager for a given path.

    Layers:
        [0] The "trunk" layer.
            Specifiers:
            []

            Files:
                - info
                - energy
                - trajectory

            Generated by :meth:`autofile.schema.data_series.conformer_trunk`

        [1] The "leaf" layer.
            Specifiers:
            [Conformer ID]

            Files:
                - geometry_info
                - gradient_info
                - hessian_info
                - geometry_input
                - gradient_input
                - hessian_input
                - energy
                - geometry
                - gradient
                - hessian
                - harmonic_frequencies
                - vpt2_info
                - vpt2_input
                - anharmonic_frequencies
                - anharmonic_zpve
                - anharmonicity_matrix
                - vibro_rot_alpha_matrix
                - quartic_centrifugal_dist_consts

            Generated by :meth:`autofile.schema.data_series.conformer_leaf`


    :param prefix: Path to where the file system will be created
    :type prefix: str
    :returns: A tuple of DataSeries objects. Each item in this tuple manages a
        different layer in the file system, as described above.
    """
    trunk_ds = data_series.conformer_trunk(prefix)
    leaf_ds = data_series.conformer_leaf(prefix, root_ds=trunk_ds)

    min_ene_dfile = data_files.energy(_FilePrefix.MIN)
    inf_dfile = data_files.information(_FilePrefix.CONF,
                                       function=info_objects.conformer_trunk)
    traj_dfile = data_files.trajectory(_FilePrefix.CONF)
    trunk_ds.add_data_files({
        _FileAttributeName.INFO: inf_dfile,
        _FileAttributeName.ENERGY: min_ene_dfile,
        _FileAttributeName.TRAJ: traj_dfile
    })

    geom_inf_dfile = data_files.information(_FilePrefix.GEOM,
                                            function=info_objects.run)
    grad_inf_dfile = data_files.information(_FilePrefix.GRAD,
                                            function=info_objects.run)
    hess_inf_dfile = data_files.information(_FilePrefix.HESS,
                                            function=info_objects.run)
    # need addl vpt2 info file, one for job status and other for fermi
    vpt2_inf_dfile = data_files.information(_FilePrefix.VPT2,
                                            function=info_objects.vpt2)
    geom_inp_dfile = data_files.input_file(_FilePrefix.GEOM)
    grad_inp_dfile = data_files.input_file(_FilePrefix.GRAD)
    hess_inp_dfile = data_files.input_file(_FilePrefix.HESS)
    vpt2_inp_dfile = data_files.input_file(_FilePrefix.VPT2)
    ene_dfile = data_files.energy(_FilePrefix.GEOM)
    geom_dfile = data_files.geometry(_FilePrefix.GEOM)
    grad_dfile = data_files.gradient(_FilePrefix.GRAD)
    hess_dfile = data_files.hessian(_FilePrefix.HESS)
    hfreq_dfile = data_files.harmonic_frequencies(_FilePrefix.HESS)
    anhfreq_dfile = data_files.anharmonic_frequencies(_FilePrefix.VPT2)
    anhzpve_dfile = data_files.anharmonic_zpve(_FilePrefix.VPT2)
    xmat_dfile = data_files.anharmonicity_matrix(_FilePrefix.VPT2)
    vibrot_mat_dfile = data_files.vibro_rot_alpha_matrix(_FilePrefix.VPT2)
    centrif_dist_dfile = data_files.quartic_centrifugal_dist_consts(
        _FilePrefix.VPT2)

    leaf_ds.add_data_files({
        _FileAttributeName.GEOM_INFO: geom_inf_dfile,
        _FileAttributeName.GRAD_INFO: grad_inf_dfile,
        _FileAttributeName.HESS_INFO: hess_inf_dfile,
        _FileAttributeName.GEOM_INPUT: geom_inp_dfile,
        _FileAttributeName.GRAD_INPUT: grad_inp_dfile,
        _FileAttributeName.HESS_INPUT: hess_inp_dfile,
        _FileAttributeName.ENERGY: ene_dfile,
        _FileAttributeName.GEOM: geom_dfile,
        _FileAttributeName.GRAD: grad_dfile,
        _FileAttributeName.HESS: hess_dfile,
        _FileAttributeName.HFREQ: hfreq_dfile,
        _FileAttributeName.VPT2_INFO: vpt2_inf_dfile,
        _FileAttributeName.VPT2_INPUT: vpt2_inp_dfile,
        _FileAttributeName.ANHFREQ: anhfreq_dfile,
        _FileAttributeName.ANHZPVE: anhzpve_dfile,
        _FileAttributeName.XMAT: xmat_dfile,
        _FileAttributeName.VIBROT_MAX: vibrot_mat_dfile,
        _FileAttributeName.CENTIF_DIST: centrif_dist_dfile
    })

    return (trunk_ds, leaf_ds)
示例#4
0
def scan(prefix):
    """ construct the scan filesystem (3 layers)

    three layers with the following locators:
        0 - []
                files:
                - vmatrix
        1 - [coo_names]
                files:
                - info
                - trajectory
        2 - [coo_names, coo_vals]
                files:
                - geometry_info
                - gradient_info
                - hessian_info
                - irc_info
                - geometry_input
                - gradient_input
                - hessian_input
                - irc_input
                - energy
                - geometry
                - zmatrix
                - gradient
                - hessian
                - harmonic_frequencies

    :param prefix: sets the path where this filesystem will sit
    :type prefix: str
    """
    trunk_ds = data_series.scan_trunk(prefix)
    branch_ds = data_series.scan_branch(prefix, root_ds=trunk_ds)
    leaf_ds = data_series.scan_leaf(prefix, root_ds=branch_ds)

    vma_dfile = data_files.vmatrix(_FilePrefix.SCAN)
    trunk_ds.add_data_files({_FileAttributeName.VMATRIX: vma_dfile})

    inf_dfile = data_files.information(_FilePrefix.SCAN,
                                       function=info_objects.scan_branch)
    traj_dfile = data_files.trajectory(_FilePrefix.SCAN)
    branch_ds.add_data_files({
        _FileAttributeName.INFO: inf_dfile,
        _FileAttributeName.TRAJ: traj_dfile
    })

    # Need an irc file in the branch!
    # Need an run irc file in the forward and backward direction

    geom_inf_dfile = data_files.information(_FilePrefix.GEOM,
                                            function=info_objects.run)
    grad_inf_dfile = data_files.information(_FilePrefix.GRAD,
                                            function=info_objects.run)
    hess_inf_dfile = data_files.information(_FilePrefix.HESS,
                                            function=info_objects.run)
    irc_inf_dfile = data_files.information(_FilePrefix.IRC,
                                           function=info_objects.run)
    geom_inp_dfile = data_files.input_file(_FilePrefix.GEOM)
    grad_inp_dfile = data_files.input_file(_FilePrefix.GRAD)
    hess_inp_dfile = data_files.input_file(_FilePrefix.HESS)
    irc_inp_dfile = data_files.input_file(_FilePrefix.IRC)
    ene_dfile = data_files.energy(_FilePrefix.GEOM)
    geom_dfile = data_files.geometry(_FilePrefix.GEOM)
    zmat_dfile = data_files.zmatrix(_FilePrefix.GEOM)
    grad_dfile = data_files.gradient(_FilePrefix.GRAD)
    hess_dfile = data_files.hessian(_FilePrefix.HESS)
    hfreq_dfile = data_files.harmonic_frequencies(_FilePrefix.HESS)
    leaf_ds.add_data_files({
        _FileAttributeName.GEOM_INFO: geom_inf_dfile,
        _FileAttributeName.GRAD_INFO: grad_inf_dfile,
        _FileAttributeName.HESS_INFO: hess_inf_dfile,
        _FileAttributeName.IRC_INFO: irc_inf_dfile,
        _FileAttributeName.GEOM_INPUT: geom_inp_dfile,
        _FileAttributeName.GRAD_INPUT: grad_inp_dfile,
        _FileAttributeName.HESS_INPUT: hess_inp_dfile,
        _FileAttributeName.IRC_INPUT: irc_inp_dfile,
        _FileAttributeName.ENERGY: ene_dfile,
        _FileAttributeName.GEOM: geom_dfile,
        _FileAttributeName.ZMAT: zmat_dfile,
        _FileAttributeName.GRAD: grad_dfile,
        _FileAttributeName.HESS: hess_dfile,
        _FileAttributeName.HFREQ: hfreq_dfile
    })

    return (trunk_ds, branch_ds, leaf_ds)
示例#5
0
文件: fs.py 项目: sjklipp/autofile
def conformer(prefix):
    """ Create a conformer file system manager for a given path.

    Layers:
        [0] The "trunk" layer.
            Specifiers:
            []

            Generated by :meth:`autofile.schema.data_series.conformer_trunk`

        [1] The "branch" layer.
            Specifiers:
            [Ring ID]

            Files:
                - info
                - energy
                - trajectory

            Generated by :meth:`autofile.schema.data_series.conformer_branch`

        [2] The "leaf" layer.
            Specifiers:
            [Conformer ID]

            Files:
                - geometry_info
                - gradient_info
                - hessian_info
                - geometry_input
                - gradient_input
                - hessian_input
                - geometry
                - gradient
                - hessian
                - harmonic_frequencies
                - vpt2_info
                - vpt2_input
                - anharmonic_frequencies
                - anharmonic_zpve
                - anharmonicity_matrix
                - vibro_rot_alpha_matrix
                - quartic_centrifugal_dist_consts
                - cubic_force_constants
                - quartic_force_constants
                - dipole_moment
                - polarizability

            Generated by :meth:`autofile.schema.data_series.conformer_leaf`


    :param prefix: Path to where the file system will be created
    :type prefix: str
    :returns: A tuple of DataSeries objects. Each item in this tuple manages a
        different layer in the file system, as described above.
    """
    trunk_ds = data_series.conformer_trunk(prefix)
    branch_ds = data_series.conformer_branch(prefix, root_ds=trunk_ds)
    leaf_ds = data_series.conformer_leaf(prefix, root_ds=branch_ds)

    # Trunk Files
    inf_dfile = data_files.information(_FilePrefix.RSAMP,
                                       function=info_objects.conformer_trunk)
    traj_dfile = data_files.trajectory(_FilePrefix.CONF)
    trunk_ds.add_data_files({
        FileAttributeName.INFO: inf_dfile,
        FileAttributeName.TRAJ: traj_dfile
    })

    # Branch Files
    inf2_dfile = data_files.information(_FilePrefix.CSAMP,
                                        function=info_objects.conformer_branch)
    traj2_dfile = data_files.trajectory(_FilePrefix.CONF)
    branch_ds.add_data_files({
        FileAttributeName.INFO: inf2_dfile,
        FileAttributeName.TRAJ: traj2_dfile
    })

    # Leaf files
    geom_inf_dfile = data_files.information(_FilePrefix.GEOM,
                                            function=info_objects.run)
    grad_inf_dfile = data_files.information(_FilePrefix.GRAD,
                                            function=info_objects.run)
    hess_inf_dfile = data_files.information(_FilePrefix.HESS,
                                            function=info_objects.run)
    vpt2_inf_dfile = data_files.information(_FilePrefix.VPT2,
                                            function=info_objects.vpt2)
    geom_inp_dfile = data_files.input_file(_FilePrefix.GEOM)
    grad_inp_dfile = data_files.input_file(_FilePrefix.GRAD)
    hess_inp_dfile = data_files.input_file(_FilePrefix.HESS)
    vpt2_inp_dfile = data_files.input_file(_FilePrefix.VPT2)
    geom_dfile = data_files.geometry(_FilePrefix.GEOM)
    grad_dfile = data_files.gradient(_FilePrefix.GRAD)
    hess_dfile = data_files.hessian(_FilePrefix.HESS)
    hfreq_dfile = data_files.harmonic_frequencies(_FilePrefix.HESS)
    anhfreq_dfile = data_files.anharmonic_frequencies(_FilePrefix.VPT2)
    anhzpve_dfile = data_files.anharmonic_zpve(_FilePrefix.VPT2)
    xmat_dfile = data_files.anharmonicity_matrix(_FilePrefix.VPT2)
    vibrot_mat_dfile = data_files.vibro_rot_alpha_matrix(_FilePrefix.VPT2)
    centrif_dist_dfile = data_files.quartic_centrifugal_dist_consts(
        _FilePrefix.VPT2)
    cubic_fc_dfile = data_files.cubic_force_constants(_FilePrefix.FC)
    quartic_fc_dfile = data_files.quartic_force_constants(_FilePrefix.FC)
    dip_mom_dfile = data_files.dipole_moment(_FilePrefix.GEOM)
    polar_dfile = data_files.polarizability(_FilePrefix.GEOM)

    leaf_ds.add_data_files({
        FileAttributeName.GEOM_INFO: geom_inf_dfile,
        FileAttributeName.GRAD_INFO: grad_inf_dfile,
        FileAttributeName.HESS_INFO: hess_inf_dfile,
        FileAttributeName.GEOM_INPUT: geom_inp_dfile,
        FileAttributeName.GRAD_INPUT: grad_inp_dfile,
        FileAttributeName.HESS_INPUT: hess_inp_dfile,
        FileAttributeName.GEOM: geom_dfile,
        FileAttributeName.GRAD: grad_dfile,
        FileAttributeName.HESS: hess_dfile,
        FileAttributeName.HFREQ: hfreq_dfile,
        FileAttributeName.VPT2_INFO: vpt2_inf_dfile,
        FileAttributeName.VPT2_INPUT: vpt2_inp_dfile,
        FileAttributeName.ANHFREQ: anhfreq_dfile,
        FileAttributeName.ANHZPVE: anhzpve_dfile,
        FileAttributeName.XMAT: xmat_dfile,
        FileAttributeName.VIBROT_MAX: vibrot_mat_dfile,
        FileAttributeName.CENTIF_DIST: centrif_dist_dfile,
        FileAttributeName.CUBIC_FC: cubic_fc_dfile,
        FileAttributeName.QUARTIC_FC: quartic_fc_dfile,
        FileAttributeName.DIP_MOM: dip_mom_dfile,
        FileAttributeName.POLAR: polar_dfile
    })

    return (trunk_ds, branch_ds, leaf_ds)