ben-sci-tools


Nameben-sci-tools JSON
Version 1.1.6 PyPI version JSON
download
home_pageNone
Summaryuseful python tools that I use to streamline my work.
upload_time2025-01-23 19:06:14
maintainerNone
docs_urlNone
authorBen Payton
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Project Description

ben-science-tools (bst) is meant to contain tools that Ben uses to streamline some of his porcesses while working on computaional chemistry.
The project currently has two main modules process_data which is used for log file or computaional chemistry output file processing and analysis, and input_file_maker which is used to generate file inputs for computational chemistry

# Documentation

## process_data

### Functions

`statp`
takes a file patern and returns the number of stationary points in each file that fits that pattern.

    Parameters
    ----------
    file_patern (str) :  a string that matches a certain string

    Returns
    -------
    a string that gives nomber of occurences and line numbers of stationary points
    
`rxn_coord_list_format`
rxn_coord_list_format takes a list of energies or enthalpies and returns a new list where each value is duplicated. This formatted list can be used to create a step-like reaction coordinate plot.

    Parameters
    ----------
    reaction_list (list[float]) :  a list of floating point numbers representing energies or enthalpies

    Returns
    -------
    a list of floating point numbers with each value duplicated for better plotting of reaction coordinates

### Classes

`out_file_scraper`
This is a parent file scraper class meant to be altered or used for scraping log files for computations. 
    
    Attributes
    ----------
    path : str
        a path to an output file
    
    file_list : list
        a list of strings where each item is the corrsponding line in the file.

    Methods
    -------
    `read_in_file()`
    Reads in a file and retruns a list where each line is an item in the list

        Parameters
        ----------
            file_name : str
                a path to an output file
        Returns
        -------
            None
                assignes self.file_list a list of all the lines in a file where each item in the list is an item.
    `set_flag_function()`
    Create the flag_functions dictionary mapping flag strings to the subparsing functions

        Parameters
        ----------
            flag : str
                this is the flag you plan to add to the flag_functions dictionary
            function_string : str
                this is the method you plan to call if the flag is found
        
        Returns
        -------
            None
                Adds to the self.flag_functions dictionary
        
`g16_scraper`
This is a child class of out_file_scraper. To be a general scraper for Gaussian 16 output files

    Attributes
    ----------

    input_line : str
        this is the input line used in the original gjf file

    checkpoint_line : str
        The "%chk=" in the original gjf file

    nproc_line : str
        The "%nproc=" in the original gjf file

    memory_line : str
        The "%mem=" line in the original gjf file

    charge : int
        Represents the charge of the system in the original gjf file

    mult : int
        represents the multiplicity of the system in the original gjf file

    start_geometry: list[str]
        the starting geometry of the sytem in the original gjf file

    Methods
    -------
    `get_input_lines()`
    Extracts the input information of the gaussian file 

        Parameters
        ----------
            self
            index : int
                The index of the line this parsing function's flag is found in the file_list
        Returns
        -------
            None
                assigns respective values to:
                    checkpoint_line : str
                    nproc_line :      str
                    memory_line :     str
                    input_line :      str
                    charge :          int
                    multiplicity :    int
                    start_geometry :  list[str]
    
    `recreate_gjf()`
    Recreates the most basic starting gjf file (does not inclued anything after the starting geometry)

        Parameters
        ----------
            self

        Returns
        -------
            str
                a formatted string of a gjf file from the start of the run

`g16_optfreq`
Child of the g16_scraper. Meant to serve as a file scraper for Gaussian16 frequency calculations

    Attributes
    ----------
    zero_point_correction                          : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.
    
    thermal_correction_to_energy                   : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.
    
    thermal_correction_to_enthalpy                 : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.
    
    thermal_correction_to_gibbs_free_energy        : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.
    
    sum_of_electronic_and_zero_point_energies      : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.
    
    sum_of_electronic_and_thermal_enthalpies       : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.
    
    sum_of_electronic_and_thermal_energies         : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.

    sum_of_electronic_and_thermal_free_energies    : float
        unit: hartrees/particle
        gives the gaussian calculated floating point number.

    zero_point_energy                              :float
        unit: hartrees/particle
        gives the zero point energy of the system
    
    vibrational_thermal_contributions              : dict {str : tuple(str,float)}
        keys:
            "Thermal_Energy"
                unit : kcal/mol
                returns a list of tuples with the the name : str of the of the contribution at index 0 and the value : float at index 0
            "CV" (specific Heat)
                unit : cal/(mol * kelvin)
                returns a list of tuples with the the name : str of the of the contribution at index 0 and the value : float at index 0
            "S" (Entropy)
                unit : cal/(mol * kelvin)
                returns a list of tuples with the the name : str of the of the contribution at index 0 and the value : float at index 0
        
    Methods
    -------
    `get_thermochemistry_properties()`
    Assigns the thermochemistry properties
        
        Parameters
        ----------
            index : int
                The index of the starting line for the thermochemistry section in an opt freq gaussian job

        Returns
        -------
            None
                Assigns values to the following attributes:
                zero_point_correction                          : float
                thermal_correction_to_energy                   : float
                thermal_correction_to_enthalpy                 : float
                thermal_correction_to_gibbs_free_energy        : float
                sum_of_electronic_and_zero_point_energies      : float
                sum_of_electronic_and_thermal_energies         : float
                sum_of_electronic_and_thermal_enthalpies       : float
                sum_of_electronic_and_thermal_free_energies    : float
                zero_point_energy                              : float
                vibrational_thermal_contributions 

## input_file_maker

### Functions

### Classes

`xyz_atom`
an atom with x, y, and z coordinates

    Attributes
    ----------
    x_val : float
        x postion
    y_val : float
        y postion
    z_val : float
        z postion
    atom_type : str
        the atomic coded for an atom i.e. C for carbon

    Methods
    -------

    `as_string()`
    returns a formatted string of atom type and xyz data

        Parameters
        ----------
        None

        Returns
        -------
        A formatted string of atom type and xyz data

`xyz_molecule`
a list of xyz_atoms

    Attributes
    ----------
        atom_list : list[xyz_atom]

    Methods
    -------
    
    `as_string()`
    returns a formatted string of atom type and xyz data

        Parameters
        ----------
        None

        Returns
        -------
        A formatted string of atom type and xyz data for each atom in the molecule on a new line
        """
    
    `add_atom()`
    adds an atom to the atom list
        
        Parameters
        ----------
        new_atom (xyz_atom)

        Returns
        -------
        None

`g16_input`
A formatting object for g16_inputs

    Attributes
    ----------

    checkpoint : str
        The name of the checkpoint file
    file_name : str
        The name of the associated input file
    geometry : xyz_molecule
        The systems geometry information 
    mem : int
        The memory usage of the calculation in GB. default is 1
    nproc : int
        the number of processors used in the cacluation the default is 36
    input_line : str
        The input line of the input file
    extra : str
        Any information that may come after the geometry section
    title_card : str
        The Title card of the input file
    charge : charge
        The charge of the system
    spin_mult : int
        The spin multiplicity of the system

## colors
colors contains color pallets. in the form of a dictionary where keys are the name of the color and values are hex representations.

`mines_primary`

"dark_blue":"#21314d",
"blaster_blue" : "#09396C",
"light_blue" :  "#879EC3" ,
"colorado_red" : "#CC4628",
"pale_blue" : "#CFDCE9"

`mines_neutral`

"white" : "#FFFFFF",
"light_gray" : "#AEB3B8",
"silver" : "#81848A",
"dark_gray" : "#75757D"

`mines_accecnt`

"earth_blue" : "#0272DE",
"muted_blue" : "#57A2BD",
"energy_yellow" : "#F0F600",
"golden_tech" : "#F1B91A",
"environment_green" : "#80C342",
"red_flannel" : "#B42024"

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ben-sci-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Ben Payton",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/3d/41/1a8fd01ac9c5c5049ca3105c9dad99c1b4922d7986ed839caf407c035071/ben_sci_tools-1.1.6.tar.gz",
    "platform": null,
    "description": "# Project Description\n\nben-science-tools (bst) is meant to contain tools that Ben uses to streamline some of his porcesses while working on computaional chemistry.\nThe project currently has two main modules process_data which is used for log file or computaional chemistry output file processing and analysis, and input_file_maker which is used to generate file inputs for computational chemistry\n\n# Documentation\n\n## process_data\n\n### Functions\n\n`statp`\ntakes a file patern and returns the number of stationary points in each file that fits that pattern.\n\n    Parameters\n    ----------\n    file_patern (str) :  a string that matches a certain string\n\n    Returns\n    -------\n    a string that gives nomber of occurences and line numbers of stationary points\n    \n`rxn_coord_list_format`\nrxn_coord_list_format takes a list of energies or enthalpies and returns a new list where each value is duplicated. This formatted list can be used to create a step-like reaction coordinate plot.\n\n    Parameters\n    ----------\n    reaction_list (list[float]) :  a list of floating point numbers representing energies or enthalpies\n\n    Returns\n    -------\n    a list of floating point numbers with each value duplicated for better plotting of reaction coordinates\n\n### Classes\n\n`out_file_scraper`\nThis is a parent file scraper class meant to be altered or used for scraping log files for computations. \n    \n    Attributes\n    ----------\n    path : str\n        a path to an output file\n    \n    file_list : list\n        a list of strings where each item is the corrsponding line in the file.\n\n    Methods\n    -------\n    `read_in_file()`\n    Reads in a file and retruns a list where each line is an item in the list\n\n        Parameters\n        ----------\n            file_name : str\n                a path to an output file\n        Returns\n        -------\n            None\n                assignes self.file_list a list of all the lines in a file where each item in the list is an item.\n    `set_flag_function()`\n    Create the flag_functions dictionary mapping flag strings to the subparsing functions\n\n        Parameters\n        ----------\n            flag : str\n                this is the flag you plan to add to the flag_functions dictionary\n            function_string : str\n                this is the method you plan to call if the flag is found\n        \n        Returns\n        -------\n            None\n                Adds to the self.flag_functions dictionary\n        \n`g16_scraper`\nThis is a child class of out_file_scraper. To be a general scraper for Gaussian 16 output files\n\n    Attributes\n    ----------\n\n    input_line : str\n        this is the input line used in the original gjf file\n\n    checkpoint_line : str\n        The \"%chk=\" in the original gjf file\n\n    nproc_line : str\n        The \"%nproc=\" in the original gjf file\n\n    memory_line : str\n        The \"%mem=\" line in the original gjf file\n\n    charge : int\n        Represents the charge of the system in the original gjf file\n\n    mult : int\n        represents the multiplicity of the system in the original gjf file\n\n    start_geometry: list[str]\n        the starting geometry of the sytem in the original gjf file\n\n    Methods\n    -------\n    `get_input_lines()`\n    Extracts the input information of the gaussian file \n\n        Parameters\n        ----------\n            self\n            index : int\n                The index of the line this parsing function's flag is found in the file_list\n        Returns\n        -------\n            None\n                assigns respective values to:\n                    checkpoint_line : str\n                    nproc_line :      str\n                    memory_line :     str\n                    input_line :      str\n                    charge :          int\n                    multiplicity :    int\n                    start_geometry :  list[str]\n    \n    `recreate_gjf()`\n    Recreates the most basic starting gjf file (does not inclued anything after the starting geometry)\n\n        Parameters\n        ----------\n            self\n\n        Returns\n        -------\n            str\n                a formatted string of a gjf file from the start of the run\n\n`g16_optfreq`\nChild of the g16_scraper. Meant to serve as a file scraper for Gaussian16 frequency calculations\n\n    Attributes\n    ----------\n    zero_point_correction                          : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n    \n    thermal_correction_to_energy                   : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n    \n    thermal_correction_to_enthalpy                 : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n    \n    thermal_correction_to_gibbs_free_energy        : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n    \n    sum_of_electronic_and_zero_point_energies      : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n    \n    sum_of_electronic_and_thermal_enthalpies       : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n    \n    sum_of_electronic_and_thermal_energies         : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n\n    sum_of_electronic_and_thermal_free_energies    : float\n        unit: hartrees/particle\n        gives the gaussian calculated floating point number.\n\n    zero_point_energy                              :float\n        unit: hartrees/particle\n        gives the zero point energy of the system\n    \n    vibrational_thermal_contributions              : dict {str : tuple(str,float)}\n        keys:\n            \"Thermal_Energy\"\n                unit : kcal/mol\n                returns a list of tuples with the the name : str of the of the contribution at index 0 and the value : float at index 0\n            \"CV\" (specific Heat)\n                unit : cal/(mol * kelvin)\n                returns a list of tuples with the the name : str of the of the contribution at index 0 and the value : float at index 0\n            \"S\" (Entropy)\n                unit : cal/(mol * kelvin)\n                returns a list of tuples with the the name : str of the of the contribution at index 0 and the value : float at index 0\n        \n    Methods\n    -------\n    `get_thermochemistry_properties()`\n    Assigns the thermochemistry properties\n        \n        Parameters\n        ----------\n            index : int\n                The index of the starting line for the thermochemistry section in an opt freq gaussian job\n\n        Returns\n        -------\n            None\n                Assigns values to the following attributes:\n                zero_point_correction                          : float\n                thermal_correction_to_energy                   : float\n                thermal_correction_to_enthalpy                 : float\n                thermal_correction_to_gibbs_free_energy        : float\n                sum_of_electronic_and_zero_point_energies      : float\n                sum_of_electronic_and_thermal_energies         : float\n                sum_of_electronic_and_thermal_enthalpies       : float\n                sum_of_electronic_and_thermal_free_energies    : float\n                zero_point_energy                              : float\n                vibrational_thermal_contributions \n\n## input_file_maker\n\n### Functions\n\n### Classes\n\n`xyz_atom`\nan atom with x, y, and z coordinates\n\n    Attributes\n    ----------\n    x_val : float\n        x postion\n    y_val : float\n        y postion\n    z_val : float\n        z postion\n    atom_type : str\n        the atomic coded for an atom i.e. C for carbon\n\n    Methods\n    -------\n\n    `as_string()`\n    returns a formatted string of atom type and xyz data\n\n        Parameters\n        ----------\n        None\n\n        Returns\n        -------\n        A formatted string of atom type and xyz data\n\n`xyz_molecule`\na list of xyz_atoms\n\n    Attributes\n    ----------\n        atom_list : list[xyz_atom]\n\n    Methods\n    -------\n    \n    `as_string()`\n    returns a formatted string of atom type and xyz data\n\n        Parameters\n        ----------\n        None\n\n        Returns\n        -------\n        A formatted string of atom type and xyz data for each atom in the molecule on a new line\n        \"\"\"\n    \n    `add_atom()`\n    adds an atom to the atom list\n        \n        Parameters\n        ----------\n        new_atom (xyz_atom)\n\n        Returns\n        -------\n        None\n\n`g16_input`\nA formatting object for g16_inputs\n\n    Attributes\n    ----------\n\n    checkpoint : str\n        The name of the checkpoint file\n    file_name : str\n        The name of the associated input file\n    geometry : xyz_molecule\n        The systems geometry information \n    mem : int\n        The memory usage of the calculation in GB. default is 1\n    nproc : int\n        the number of processors used in the cacluation the default is 36\n    input_line : str\n        The input line of the input file\n    extra : str\n        Any information that may come after the geometry section\n    title_card : str\n        The Title card of the input file\n    charge : charge\n        The charge of the system\n    spin_mult : int\n        The spin multiplicity of the system\n\n## colors\ncolors contains color pallets. in the form of a dictionary where keys are the name of the color and values are hex representations.\n\n`mines_primary`\n\n\"dark_blue\":\"#21314d\",\n\"blaster_blue\" : \"#09396C\",\n\"light_blue\" :  \"#879EC3\" ,\n\"colorado_red\" : \"#CC4628\",\n\"pale_blue\" : \"#CFDCE9\"\n\n`mines_neutral`\n\n\"white\" : \"#FFFFFF\",\n\"light_gray\" : \"#AEB3B8\",\n\"silver\" : \"#81848A\",\n\"dark_gray\" : \"#75757D\"\n\n`mines_accecnt`\n\n\"earth_blue\" : \"#0272DE\",\n\"muted_blue\" : \"#57A2BD\",\n\"energy_yellow\" : \"#F0F600\",\n\"golden_tech\" : \"#F1B91A\",\n\"environment_green\" : \"#80C342\",\n\"red_flannel\" : \"#B42024\"\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "useful python tools that I use to streamline my work.",
    "version": "1.1.6",
    "project_urls": {
        "Documentation": "https://github.com/Ben-Payton/ben_sci_tools/blob/main/README.md",
        "Source": "https://github.com/Ben-Payton/ben_sci_tools"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6bb1dc0aada97b6acda00c9b7f0f423a4661fc5cd8b7694c4fad578b598cb6f6",
                "md5": "fee559857e6ab801da729b21d40d028d",
                "sha256": "40251b89d6a9da672c789faccd11830fddb32aac31c98b7563cf954a29ac44f8"
            },
            "downloads": -1,
            "filename": "ben_sci_tools-1.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fee559857e6ab801da729b21d40d028d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22795,
            "upload_time": "2025-01-23T19:06:13",
            "upload_time_iso_8601": "2025-01-23T19:06:13.461787Z",
            "url": "https://files.pythonhosted.org/packages/6b/b1/dc0aada97b6acda00c9b7f0f423a4661fc5cd8b7694c4fad578b598cb6f6/ben_sci_tools-1.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3d411a8fd01ac9c5c5049ca3105c9dad99c1b4922d7986ed839caf407c035071",
                "md5": "837f93a190394e34caa9bfbca87d17e6",
                "sha256": "0693923f99bd4921ded41298bb32eb582711ec3cb8e1fcb4e62ea4f183fb5e03"
            },
            "downloads": -1,
            "filename": "ben_sci_tools-1.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "837f93a190394e34caa9bfbca87d17e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21913,
            "upload_time": "2025-01-23T19:06:14",
            "upload_time_iso_8601": "2025-01-23T19:06:14.633600Z",
            "url": "https://files.pythonhosted.org/packages/3d/41/1a8fd01ac9c5c5049ca3105c9dad99c1b4922d7986ed839caf407c035071/ben_sci_tools-1.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-23 19:06:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Ben-Payton",
    "github_project": "ben_sci_tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ben-sci-tools"
}
        
Elapsed time: 1.07922s