#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 config.append_atom_unbonded( atm_t_bb, 0.0 ) iatm += 1 config.append_atom_bonded(1, 0.0, len_bond, 'efjc', iatm-1, sep=sep) iatm += 1 for i in range(3,natm+1): config.append_atom_bonded(atm_t_bb, 0.0, len_bond, 'efjc', iatm-1, im2=iatm-2, theta=theta, sep=sep) iatm += 1 for i in range(1, nbnd+1): j = iatm_beg + i - 1 config.add_bond(bnd_t_bb, j, j+1) ibnd += 1 for i in range(1, nang+1): j = iatm_beg + i - 1
#Add atoms, bonds, and angles of chains. len_bond = 2.0 #Approx. equilibrium bond length sep = 1.95 # For checking overlap, must be <= len_bond theta = (45.0 / 180.0) * math.pi #Avg. initial bond angle #Loop over all chains iatm = 0 ibnd = 0 iang = 0 #Index of the last atom, bond, etc. added for imol in range(1, num_mols + 1): iatm_beg = iatm + 1 ibnd_beg = ibnd + 1 iang_beg = iang + 1 #First atom can be at any location iatm = config.append_atom_unbonded(atm_t_m, 0.0, sep=sep) #Add second atom bonded to the first as a freely jointed link iatm = config.append_atom_bonded(atm_t_m, 0.0, len_bond, 'efjc', iatm, sep=sep) #Add rest of the atoms as freely rotating links for i in range(3, natm + 1): iatm = config.append_atom_bonded(atm_t_m, 0.0, len_bond, 'efrc', iatm, im2=iatm - 1,
config.add_ia_vdw('A', 'B', 5, np.array([eps, sigma, rcut, rcut_coul, C])) #Add atoms, bonds, and angles sep = 1.95 # Must be <= len_bond #Loop over all molecules 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_A + 1): iatm_beg = iatm ibnd_beg = ibnd iang_beg = iang config.append_atom_unbonded(atm_t_a, 1.0, sep=sep) iatm += 1 config.add_molecule(mol_t_A, natm, iatm_beg, 0, ibnd_beg, 0, iang_beg, 0, 0) for imol in range(1, num_mols_B + 1): iatm_beg = iatm ibnd_beg = ibnd iang_beg = iang config.append_atom_unbonded(atm_t_b, -1.0, sep=sep) iatm += 1 config.add_molecule(mol_t_B, natm, iatm_beg, 0, ibnd_beg, 0, iang_beg, 0, 0)
#Add atoms, bonds, and angles len_bond = 1.94 #0.97*sigma #Equilibrium bond length theta = (25.0 / 180.0) * math.pi sep = 1.9 # 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 config.append_atom_unbonded(atm_t_bb, 0.0, sep=sep) iatm += 1 config.append_atom_bonded(1, 0.0, len_bond, 'efjc', iatm - 1, sep=sep) iatm += 1 for i in range(3, natm + 1): config.append_atom_bonded(atm_t_bb, 0.0, len_bond, 'efjc', iatm - 1, im2=iatm - 2, theta=theta, sep=sep) iatm += 1 for i in range(1, nbnd + 1):