''' import sys import math import numpy as np from configuration import Configuration from config_io import * #------------------------------------------------------------------------------- config = Configuration() #Add simulation box and boundary condition. The box size can be updated later if #necessary. config.add_simbox(40.0, 40.0, 40.0, 0) #Number of backbone atoms na_bbone = 30 #int(sys.argv[1]) #Number of atoms on each side chain 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)
Creates initial configuration for a system containing unbranched linear chains. ''' import sys import math import numpy as np from configuration import Configuration from config_io import * #------------------------------------------------------------------------------- config = Configuration() #Add simulation box and boundary condition. The box size can be updated later if #necessary. config.add_simbox(10.0, 10.0, 10.0, 1) #Molecule details num_mols_A = 60 num_mols_B = 60 mol_t_A = config.add_molecule_type('A', num_mols_A) mol_t_B = config.add_molecule_type('B', num_mols_B) #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)
chain in an unbounded domain. ''' import sys import math import numpy as np from configuration import Configuration from config_io import * #------------------------------------------------------------------------------- config = Configuration() #Add simulation box and boundary condition. The box size can be updated later if #necessary. config.add_simbox(20.0, 20.0, 20.0, 0) #Molecule details num_mols = 1 config.add_molecule_type('CHN-UB', num_mols) #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
''' Creates initial configuration for a system containing charged chains and counterions. ''' 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(30.0, 30.0, 30.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 = 2.0 rcut = 2.0**(1.0 / 6) * sigma bnd_t_chn = config.add_bond_type(