<commit_before>__author__ = "<NAME>"

# ==================> Internal modules <==========
from noodles import gather
from qmworks import run
from qmworks.utils import concatMap


# ==================<>====================


def write_cube_file(center, coordinates, grid_spec, arr):
    """
    Write some density using the cubefile format
    :param center: Center of the grid
    :type center:
    """
    def formatCols(xs, cols=4):
        if cols == 4:
            string = '{} {:10.6f} {:10.6f} {:10.6f}\n'<commit_msg>read cube file using numpy<commit_after>__author__ = "<NAME>"


import numpy as np

# ==================> Internal modules <==========
from noodles import gather
from qmworks import run
from qmworks.utils import concatMap


# =====================================<>======================================




def calculateGrid(timeCoeffs, mo, center=(0, 0, 0), nPoints=(80, 80, 80),
                  nmin=None, nmax=None):
    """
    """


def read_cube_file(path_to_cube, numat):
    """
    Read a cube files and return the array together with the grid
    parameters.

    :param path_to_cube: path to the cube file to read
    :type path_to_cube: String
    """
    with open(path_to_cube, 'r') as f:
        head = [next(f) for i in range(6)]
    # There are 2 initial lines cotaining comments.
    # Then one line cotaining the grid center and finally
    # 3 lines with the number of voxels and the axis vector. 
    num_lines = numat + 6  # 
    np.loadtxt(path_to_cube, skiprows=num_lines)


    def write_cube_file(center, coordinates, grid_spec, arr):
    """
    Write some density using the cubefile format
    :param center: Center of the grid
    :type center:
    """
    def formatCols(xs, cols=4):
        if cols == 4:
            string = '{} {:10.6f} {:10.6f} {:10.6f}\n'
{'fraction_non_alphanumeric': 0.1928374655647383, 'fraction_numerical': 0.01928374655647383, 'mean_word_length': 3.2830188679245285, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5252852', 'n_tokens_mistral': 609, 'n_tokens_neox': 555, 'n_words': 181}