def __init__(self, at_type, at_coords, at_charge, at_ro, at_eps, at_mass):
     self.attype = at_type
     self.element = at_type[0].capitalize()
     self.coords = at_coords
     self.charge = at_charge
     self.ro = at_ro
     self.eps = at_eps
     self.sreps = math.sqrt(self.eps)
     self.mass = at_mass
     self.covrad = param.get_cov_rad(self.element)
     self.e_nonbonded = 0.0
     self.e_bonded = 0.0
     self.g_nonbonded = np.zeros(3)
     self.g_bonded = np.zeros(3)
 def __init__(self, at_type, at_coords, at_charge, at_ro, at_eps, at_mass):
     self.attype = at_type
     self.element = at_type[0].capitalize()
     self.coords = at_coords
     self.charge = at_charge
     self.ro = at_ro
     self.eps = at_eps
     self.sreps = math.sqrt(self.eps)
     self.mass = at_mass
     self.covrad = param.get_cov_rad(self.element)
     self.e_nonbonded = 0.0
     self.e_bonded = 0.0
     self.g_nonbonded = np.zeros(3)
     self.g_bonded = np.zeros(3)
Esempio n. 3
0
def get_geom(mol):
    infile_array = get_file_string_array(mol.infile)
    mol.n_atoms = int(infile_array[0][0])
    for i in range(mol.n_atoms):
        at_type = infile_array[i+2][0]
        at_coords = np.zeros(3)
        for j in range(3):
            at_coords[j] = float(infile_array[i+2][j+1])
        at_charge = float(infile_array[i+2][4])
        at_element = at_type[0].capitalize()
        at_mass = param.get_at_mass(at_element)
        at_ro, at_eps = param.get_vdw_param(at_type)
        new_atom = molecule.atom(at_type, at_coords, at_charge, at_ro, at_eps, at_mass)
        new_atom.set_covrad(param.get_cov_rad(at_element))
        mol.atoms.append(new_atom)