示例#1
0
 def from_string(cls, string, format, name="molecule"):
     hand = StringHandler()
     data = hand.read(string,format)
     atomlist = [ (at.atno, at.r) for at in data.molecule.atoms ]
     return cls( name, atomlist = atomlist,
                 charge = data.molecule.charge,
                 multiplicity = data.molecule.multiplicity)
示例#2
0
 def from_string(cls, string, format, name="molecule"):
     hand = StringHandler()
     data = hand.read(string, format)
     atomlist = [(at.atno, at.r) for at in data.molecule.atoms]
     return cls(name,
                atomlist=atomlist,
                charge=data.molecule.charge,
                multiplicity=data.molecule.multiplicity)
示例#3
0
 def as_string(self, format="xyz"):
     from PyQuante.IO.Data import Data
     data = Data()
     data.molecule = self
     hand = StringHandler()
     return hand.write(data, format)
示例#4
0
 def as_string(self,format="xyz"):
     from PyQuante.IO.Data import Data
     data = Data()
     data.molecule = self
     hand = StringHandler()
     return hand.write(data, format)