Exemplo n.º 1
0
na_sc = 4  #int(sys.argv[2])
#Number of atoms between consecutive branch points
na_sp = 0
#Number of side chains growing from a branch point
f = 1

#Atom types
#All atoms are point particles with unit mass
atm_t_bb = config.add_atom_type('BB', 1, 1.0)
atm_t_sc = config.add_atom_type('SC', 1, 1.0)

#Vdw interaction
eps = 1.0
sigma = 2.0
rcut = 2.0**(1.0 / 6) * sigma
config.add_ia_vdw('BB', 'BB', 1, np.array([eps, sigma, rcut]))
config.add_ia_vdw('BB', 'SC', 1, np.array([eps, sigma, rcut]))
config.add_ia_vdw('SC', 'SC', 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]))
bnd_t_bs = config.add_bond_type(
    3, np.array([30 * eps / sigma**2, 1.5 * sigma, eps, sigma]))
bnd_t_ss = config.add_bond_type(
    3, np.array([30 * eps / sigma**2, 1.5 * sigma, eps, sigma]))

#Angle types (No angles)

#Dihedral types (No dihedrals)
Exemplo n.º 2
0
#Total number of atoms in the molecule
natm = 1

#Atom types
# natm atoms as point particles with mass 1.0
atm_t_a = config.add_atom_type('A', 1, 1.0)
atm_t_b = config.add_atom_type('B', 1, 1.0)

#Vdw interaction
eps = 1.0
sigma = 2.0
rcut = 2.0**(1.0 / 6) * sigma
rcut_coul = 0
C = 2.0
config.add_ia_vdw('A', 'A', 5, np.array([eps, sigma, rcut, rcut_coul, C]))
config.add_ia_vdw('B', 'B', 5, np.array([eps, sigma, rcut, rcut_coul, C]))
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
Exemplo n.º 3
0
#Total number of atoms in the molecule
natm = 30 #int(sys.argv[1])

#Total number of bonds
nbnd = natm - 1

#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
Exemplo n.º 4
0
'''
import sys
import math
import numpy as np
from configuration import Configuration
from config_io import *

#-------------------------------------------------------------------------------

config = Configuration()

#Add simulation box with PBC.
config.add_simbox(20.0, 20.0, 20.0, 1)

'''
#The system consists of polymer chains and couterions.

#Atom types
#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 = 1.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)