Initial Polarization Process
This commit is contained in:
@@ -10,6 +10,7 @@ class Config:
|
||||
|
||||
n_procs: int = 1
|
||||
pop: str = "chelpg"
|
||||
charge_tolerance = 0.02
|
||||
comment: str = "crystalpol"
|
||||
simulation_dir = "simfiles"
|
||||
mult: list = \
|
||||
|
||||
@@ -34,6 +34,9 @@ class Crystal:
|
||||
else:
|
||||
self.cells.append(cell)
|
||||
|
||||
def get_number_of_charges(self):
|
||||
return len(self.cells[0][0])
|
||||
|
||||
def _is_valid_cell(self, cell: List[Molecule]) -> bool:
|
||||
if len(cell) == len(self.structure):
|
||||
for i, molecule in enumerate(cell):
|
||||
|
||||
@@ -28,12 +28,7 @@ class Molecule:
|
||||
__slots__ = (
|
||||
'mol_name',
|
||||
'atoms',
|
||||
'position',
|
||||
'energy',
|
||||
'gradient',
|
||||
'hessian',
|
||||
'total_mass',
|
||||
'com'
|
||||
'position'
|
||||
)
|
||||
|
||||
def __init__(self, mol_name: str) -> None:
|
||||
@@ -51,6 +46,9 @@ class Molecule:
|
||||
for atom in self.atoms:
|
||||
yield atom
|
||||
|
||||
def __len__(self):
|
||||
return len(self.atoms)
|
||||
|
||||
def add_atom(self, a: Atom) -> None:
|
||||
"""
|
||||
Adds Atom instance to the molecule.
|
||||
|
||||
Reference in New Issue
Block a user