Input File ============ To predict the structure of an amorphous material, one needs to prepare: - ``*.inp`` An input file containing simulation parameters. - ``*.xyz`` A file containing coordinates, connectivity, reactive sites, and force field information of a monomer. In the following, we will describe how to prepare these files. Simulation Parameters: ``*.inp`` ------------------------------------------- An input file ``mol.inp`` that containing all options is given below: .. code-block:: :caption: mol.inp :linenos: charmm scaling14 1.0 # Scaling factor of 1-4 electrostatic interactions. rcutoff 12.0 # The cutoff radius for nonbonded interactions. rswitch 10.0 # The distance to activate switching function. If it is # larger than rcutoff, switching and shift function will not be used. es_scheme ewald end opt num_steps 500 epsilon 1.E-3 end md dt 0.0005 # The time step in ps. temp 1400. # The temperature in Kelvin. temp_nhc_length 5 # The length of temperature Nose-Hoover chain. temp_nhc_tau 0.05 # The time constant of temperature Nose-Hoover chain in ps. num_steps 1000 # The number of steps. output_freq 10000 # The output frequency. end unit a.xyz 30 b.xyz 40 end grow dir_fn paf80 # The folder to store intermediate files. md_freq 20 # The frequency to do MD simulations. num_steps 10 # The number of steps to grow. -1: Just after all species are depleted. r_intra 4 # The distance to activate intramolecular bonding. end The simulation is controlled by parameters in ``mol.inp``. There are some points here: - You can put as many spaces as you wish anywhere. - Anything after ``#`` is regarded as comment. - A statement block like ``md...end`` is called an option block, and ``dt 0.001`` is an option to set ``dt`` a value of ``0.001``. If not given, a default number will be assigned. You can find explainations for all details in :doc:`keywords`. In practise, you can just copy the above file and modify some options. Monomer Information: ``*.xyz`` ------------------------------------------- A typical monomer file ``monomer.xyz`` is given below: .. code-block:: :caption: monomer.xyz :linenos: 45 PAF- C -0.00000000 0.00000000 0.00000000 C -0.99204361 0.67989624 -0.94006954 C -1.62513076 -0.10642738 -1.90138442 C -1.24520505 2.04367646 -0.93242437 C -2.50784698 0.45009463 -2.80643536 H -1.41636178 -1.16636581 -1.94027187 C -2.12863118 2.60280511 -1.84215854 H -0.74872619 2.68691666 -0.22165626 C -2.76733728 1.81056951 -2.77756466 H -2.99072901 -0.17871632 -3.54031416 H -2.31214042 3.66730700 -1.81823226 H -3.45545629 2.24898711 -3.48516956 C 0.67989624 0.99204361 0.94006954 C 2.04367646 1.24520505 0.93242437 C -0.10642738 1.62513076 1.90138442 C 2.60280511 2.12863118 1.84215854 H 2.68691666 0.74872619 0.22165626 C 0.45009463 2.50784698 2.80643536 H -1.16636581 1.41636178 1.94027187 C 1.81056951 2.76733728 2.77756466 H 3.66730700 2.31214042 1.81823226 H -0.17871632 2.99072901 3.54031416 H 2.24898711 3.45545629 3.48516956 C 0.99204361 -0.67989624 -0.94006954 C 1.24520505 -2.04367646 -0.93242437 C 1.62513076 0.10642738 -1.90138442 C 2.12863118 -2.60280511 -1.84215854 H 0.74872619 -2.68691666 -0.22165626 C 2.50784698 -0.45009463 -2.80643536 H 1.41636178 1.16636581 -1.94027187 C 2.76733728 -1.81056951 -2.77756466 H 2.31214042 -3.66730700 -1.81823226 H 2.99072901 0.17871632 -3.54031416 H 3.45545629 -2.24898711 -3.48516956 C -0.67989624 -0.99204361 0.94006954 C 0.10642738 -1.62513076 1.90138442 C -2.04367646 -1.24520505 0.93242437 C -0.45009463 -2.50784698 2.80643536 H 1.16636581 -1.41636178 1.94027187 C -2.60280511 -2.12863118 1.84215854 H -2.68691666 -0.74872619 0.22165626 C -1.81056951 -2.76733728 2.77756466 H 0.17871632 -2.99072901 3.54031416 H -3.66730700 -2.31214042 1.81823226 H -2.24898711 -3.45545629 3.48516956 1 2 1.0 13 1.0 24 1.0 35 1.0 2 3 1.5 4 1.5 3 5 1.5 6 1.0 4 7 1.5 8 1.0 5 9 1.5 10 1.0 6 7 9 1.5 11 1.0 8 9 12 1.0 10 11 12 13 14 1.5 15 1.5 14 16 1.5 17 1.0 15 18 1.5 19 1.0 16 20 1.5 21 1.0 17 18 20 1.5 22 1.0 19 20 23 1.0 21 22 23 24 25 1.5 26 1.5 25 27 1.5 28 1.0 26 29 1.5 30 1.0 27 31 1.5 32 1.0 28 29 31 1.5 33 1.0 30 31 34 1.0 32 33 34 35 36 1.5 37 1.5 36 38 1.5 39 1.0 37 40 1.5 41 1.0 38 42 1.5 43 1.0 39 40 42 1.5 44 1.0 41 42 45 1.0 43 44 45 9 0 12 0 9 0 12 0 0 20 0 23 0 20 0 23 0 0 31 0 34 0 31 0 34 0 0 42 0 45 0 42 0 45 0 0 CG331 0.0 CG2R61 0.0 CG2R61 -0.115000 CG2R61 -0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 HGR61 +0.115000 HGR61 +0.115000 CG2R61 0.0 CG2R61 -0.115000 CG2R61 -0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 HGR61 +0.115000 HGR61 +0.115000 CG2R61 0.0 CG2R61 -0.115000 CG2R61 -0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 HGR61 +0.115000 HGR61 +0.115000 CG2R61 0.0 CG2R61 -0.115000 CG2R61 -0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 CG2R61 -0.115000 HGR61 +0.115000 HGR61 +0.115000 HGR61 +0.115000 There are 4 parts in the monomer file: - Line 1-47: Monomer coordinates in XYZ format: number of atoms; an arbitrary title; element symbol and coordiantes in Angstrom. - Line 48: A blank line. - Line 49-93: Connectivity. This is the Gaussian job file (gjf) format. For example, ``18 20 1.5 22 1.0`` means that atom ``18`` connects with atom ``20`` and ``22`` with a bond order of ``1.5`` and ``1.0``, respectively. Currently, the bond order is not used by ABPolymer. - Line 94: A blank line. - Line 95-98: Reactive sties. They are the atoms that are ready to react with other ones to generate a new bond. This molecule has 4 reactive sites, so there are 4 line. A reactive site is defined as: .. centered:: ``bonding_atom_indices_A 0 leaving_atom_indices_A 0 bonding_atom_indices_B 0 leaving_atom_indices_B 0 site_type`` Let's take line 97 as an example. During a reaction, some atoms are leaving and some atoms are bonding to others, this is given by ``leaving_atom_indices_A`` and ``bonding_atom_indices_A``, respectively. They are seperated by ``0``. As shown below, the hydrogen atom ``34`` is leaving and the carbon atom ``31`` will be bonding with other atoms, so we write ``31 0 34 0``. .. figure:: ./figs/site1.png :align: center To be compatible with some functions that are being developed, this information has to be repeated once, so we write ``31 0 34 0 31 0 34 0`` Finally, each site will be given an integer as a ``type``. An important point is that two sites can bond **only when the sum of their types are zero**! For example, the above site is ``0``, so they can bond to each other. In the following case, if we have two species, we can set the types of the sites for ``+1`` and ``-1``, so only the contraction reaction will occur, avoiding the non-chemical reactions. Note that, for the amine, we set two leaving atoms. .. figure:: ./figs/site2.png :align: center - Line 99: A blank line. - Line 100-144: Force field information. Each line corresponds to each atom defined in coordinate part. For example, ``CG2R61 -0.115000`` means that this atom is of ``CG2R61`` type and has a charge of ``-0.115000``. For details of preparing monomer file ``*.xyz``, like how to determine the atom types, how to calculate atomic charges, and how to generate connectivity automatically, see :doc:`monomer`.