예제 #1
0
 def __init__(self, data):
     self.data = data
     rank, radius = data['sphere params']
     self.rank = rank
     representation = ('spherical', rank)
     atoms = data['atoms']
     name = data['name']
     try:
         sym = data['symmetry']
     except KeyError:
         sym = False
     try:
         frame = data['frame']
     except KeyError:
         frame = None
     try:
         origin = np.array(data['origin'])
     except KeyError:
         origin = np.zeros(3)
     AtomsInMolecule.__init__(self, name=name, atoms=atoms, sym=sym)
     #origin = self.center_of_mass()
     Multipole.__init__(self, name=name, origin=origin, representation=representation)
     LebedevSphere.__init__(self, name=name, rank=rank, radius=radius, \
             origin=origin, ref_multipoles=data['multipoles'], frame=frame)
     if not self.frame is None:
         self.align_with_frame()
     self.set_sym_sites()
     self.set_multipole_matrix()
예제 #2
0
 def __init__(self, data):
     self.sphere_params = data['sphere params']
     atoms = data['atoms']
     name = data['name']
     try:
         self.theory = data['theory']
     except KeyError:
         self.theory = None
     try:
         sym = data['symmetry']
     except KeyError:
         sym = False
     try:
         representation = data['representation']
     except KeyError:
         representation = None
     Multipole.__init__(self, name=name, representation=representation)
     MoleculeWithFrames.__init__(self, name, atoms, sym)
     self.set_frames(self.framed_atoms)
     for frame in self.frames:
         frame.center.align_with_frame_and_recompute()
     self.set_sym_sites()
     if representation is not None:
         self.set_multipole_matrix()