Beispiel #1
0
#Total number of angles. If no angles set num_angles to zero.
nang = natm - 2 if natm > 2 else 0

#Atom types
# natm atoms as point particles with mass 1.0
atm_t_bb = config.add_atom_type('M', 1, 1.0)

#Vdw interaction
eps = 1.0; sigma = 2.0; rcut = 2.0**(1.0/6)*sigma
config.add_ia_vdw('M', 'M', 1, np.array([eps, sigma, rcut]))

#Bond types
bnd_t_bb = config.add_bond_type(3, np.array([30*eps/sigma**2, 1.5*sigma, eps, sigma]))

#Angle types
ang_t_bb = config.add_angle_type(1, np.array([2.0]))

#Tether types (No tethers)
#teth_t = config.add_tether_type(1, np.array([2.0, 1e-6]))

#Add atoms, bonds, and angles
len_bond = 2.0 #0.97*sigma #Equilibrium bond length
theta = (25.0/180.0)*math.pi
sep = 2.0 # Must be <= len_bond

#Loop over all molecules (here only a single molecule type)
imol = 1; iatm = 1; ibnd = 1; iang = 1 #Index of one past the last atom, bond, etc. added
for imol in range(1, num_mols+1):
    iatm_beg = iatm
    ibnd_beg = ibnd
    iang_beg = iang
Beispiel #2
0
#Monomer atoms as point particles with mass 1.0
atm_t_m = config.add_atom_type('M', 1, 1.0)
#Counterion atoms as point particles with mass 1.0.
atm_t_c = config.add_atom_type('C', 1, 1.0)

#Bond types
#Bonds along the chain. (Kremer-Grest)
eps = 1.0
sigma = 2.0
rcut = 2.0**(1.0 / 6) * sigma
bnd_t_chn = config.add_bond_type(
    3, np.array([30 * eps / sigma**2, 1.5 * sigma, eps, sigma]))

#Angle types
#Angles along the chain. (Cosine)
ang_t_chn = config.add_angle_type(1, np.array([2.0, 1.0]))

#Vdw (pairwise) interaction. 12-6 LJ+Coulomb (cut & shifted)
#Assume same for all pairs
eps = 1.0
sigma = 2.0
rcut = 2.0**(1.0 / 6) * sigma
rcut_coul = rcut + 3.0
C = 20.0
config.add_ia_vdw('M', 'M', 5, np.array([eps, sigma, rcut, rcut_coul, C]))
config.add_ia_vdw('C', 'C', 5, np.array([eps, sigma, rcut, rcut_coul, C]))
config.add_ia_vdw('M', 'C', 5, np.array([eps, sigma, rcut, rcut_coul, C]))

#Molecules
#Chain, let there be 5 such molecules.
num_mols = 5