Logo Search packages:      
Sourcecode: cclib version File versions  Download package

def cclib::bridge::cclib2pyquante::makepyquante (   atomcoords,
  atomnos,
  charge = 0,
  mult = 1 
)
Create a PyQuante Molecule.

>>> import numpy
>>> from PyQuante.hartree_fock import hf
>>> atomnos = numpy.array([1,8,1],"i")
>>> a = numpy.array([[-1,1,0],[0,0,0],[1,1,0]],"f")
>>> pyqmol = makepyquante(a,atomnos)
>>> en,orbe,orbs = hf(pyqmol)
>>> print int(en * 10) / 10. # Should be around -73.8
-73.8

Definition at line 10 of file cclib2pyquante.py.

                                                       :
    """Create a PyQuante Molecule.

    >>> import numpy
    >>> from PyQuante.hartree_fock import hf
    >>> atomnos = numpy.array([1,8,1],"i")
    >>> a = numpy.array([[-1,1,0],[0,0,0],[1,1,0]],"f")
    >>> pyqmol = makepyquante(a,atomnos)
    >>> en,orbe,orbs = hf(pyqmol)
    >>> print int(en * 10) / 10. # Should be around -73.8
    -73.8
    """
    return Molecule("notitle", zip(atomnos, atomcoords), units="Angstrom",
                    charge=charge, multiplicity=mult)


Generated by  Doxygen 1.6.0   Back to index