def compute_bundle_density(*Ch,
                           r_vdw=None,
                           bond=None,
                           element1=None,
                           element2=None):
    """Compute nanotube bundle mass density \
    :math:`\\rho_{\\mathrm{bundle}}(n, m)` in :math:`\\mathrm{g/cm^3}`.

    .. math::

        \\rho_{\\mathrm{bundle}}(n, m) = \\frac{8\\pi^2 m_{\\mathrm{C}}
        \\sqrt{n^2 + m^2 + nm}}{9\\sqrt{3}a_{\\mathrm{CC}}^3 \\times
        \\left(\\sqrt{n^2 + m^2 + nm} +
        \\frac{\\pi d_{\\mathrm{vdW}}}{\\sqrt{3}a_{\\mathrm{CC}}}\\right)^2}

    Parameters
    ----------
    *Ch : {:class:`python:tuple` or :class:`python:int`\ s}
        Either a 2-tuple of ints or 2 integers giving the chiral indices
        of the nanotube chiral vector
        :math:`\\mathbf{C}_h = n\\mathbf{a}_1 + m\\mathbf{a}_2 = (n, m)`.
    r_vdw : int
        van der Waals radius of nanotube atoms
    bond : float, optional
        Bond length.

    Returns
    -------
    float
        :math:`\\rho_{\\mathrm{bundle}}` in units of
        :math:`\\mathrm{\\frac{g}{cm^3}}`

    """
    n, m, _ = get_chiral_indices(*Ch)

    if bond is None:
        bond = aCC

    if element1 is None:
        element1 = 'C'
    if element2 is None:
        element2 = 'C'

    if r_vdw is None:
        r_vdw = vdw_radius_from_basis(element1, element2)

    if element1 == element2:
        bundle_density = 8 * np.pi ** 2 * Atom(element1).mass * \
            np.sqrt(n ** 2 + m ** 2 + n * m) / \
            (9 * np.sqrt(3) * bond ** 3 *
                (np.sqrt(n ** 2 + m ** 2 + n * m) +
                    2 * np.pi * r_vdw / (np.sqrt(3) * bond)) ** 2)
    else:
        bundle_density = 0

    # there are 1.6605e-24 grams / Da and 1e-8 cm / angstrom
    bundle_density *= grams_per_Da / (1e-8)**3
    return bundle_density
Example #2
0
def compute_bundle_density(*Ch, r_vdw=None, bond=None,
                           element1=None, element2=None):
    """Compute nanotube bundle mass density \
    :math:`\\rho_{\\mathrm{bundle}}(n, m)` in :math:`\\mathrm{g/cm^3}`.

    .. math::

        \\rho_{\\mathrm{bundle}}(n, m) = \\frac{8\\pi^2 m_{\\mathrm{C}}
        \\sqrt{n^2 + m^2 + nm}}{9\\sqrt{3}a_{\\mathrm{CC}}^3 \\times
        \\left(\\sqrt{n^2 + m^2 + nm} +
        \\frac{\\pi d_{\\mathrm{vdW}}}{\\sqrt{3}a_{\\mathrm{CC}}}\\right)^2}

    Parameters
    ----------
    *Ch : {:class:`python:tuple` or :class:`python:int`\ s}
        Either a 2-tuple of ints or 2 integers giving the chiral indices
        of the nanotube chiral vector
        :math:`\\mathbf{C}_h = n\\mathbf{a}_1 + m\\mathbf{a}_2 = (n, m)`.
    r_vdw : int
        van der Waals radius of nanotube atoms
    bond : float, optional
        Bond length.

    Returns
    -------
    float
        :math:`\\rho_{\\mathrm{bundle}}` in units of
        :math:`\\mathrm{\\frac{g}{cm^3}}`

    """
    n, m, _ = get_chiral_indices(*Ch)

    if bond is None:
        bond = aCC

    if element1 is None:
        element1 = 'C'
    if element2 is None:
        element2 = 'C'

    if r_vdw is None:
        r_vdw = vdw_radius_from_basis(element1, element2)

    if element1 == element2:
        bundle_density = 8 * np.pi ** 2 * Atom(element1).mass * \
            np.sqrt(n ** 2 + m ** 2 + n * m) / \
            (9 * np.sqrt(3) * bond ** 3 *
                (np.sqrt(n ** 2 + m ** 2 + n * m) +
                    2 * np.pi * r_vdw / (np.sqrt(3) * bond)) ** 2)
    else:
        bundle_density = 0

    # there are 1.6605e-24 grams / Da and 1e-8 cm / angstrom
    bundle_density *= grams_per_Da / (1e-8) ** 3
    return bundle_density
Example #3
0
 def vdw_radius(self):
     """van der Waals radius"""
     if self._vdw_radius is not None:
         return self._vdw_radius
     else:
         return vdw_radius_from_basis(self.basis[0], self.basis[1])
Example #4
0
 def vdw_radius(self):
     """van der Waals radius"""
     if self._vdw_radius is not None:
         return self._vdw_radius
     else:
         return vdw_radius_from_basis(self.basis[0], self.basis[1])