-
Notifications
You must be signed in to change notification settings - Fork 4
Test case
This section refers to an example case for utilizing PolySMart in order to generate a crosslinked structure of 2K polyurethane from the stoichiometric ratio of starting ingredients, 600 molecules of polyethylene glycol (PEG) with two functionalities, and 400 molecules of Desmodur with three functionalities.
First of all, we need to generate the simulation box consisting of all ingredients. So we need to make structure file (.gro) of the system from gro files of ingredients.
cd data
gmx insert-molecules -ci CGM_PEG.gro -nmol 600 -box 70 70 70 -o out.gro
gmx insert-molecules -f out.gro -ci CGM_DesmodurN.gro -nmol 400 -o box.gro
The output 'box.gro' and itp files of ingredients should be placed in 'data' folder. The file 'input.txt' should be edited accordingly.
1 4 1000 93.75 COH
CGM_PEG.itp CGM_DesmodurN.itp
600 400
COH 1 NCO 1
COH NCO 0.25 0.4 1.0 TN3 SP4 0.3 15000
The first line specifies the number of the beginning loop, CPU threads, end loop, desired conversion, and bead name for conversion calculation. The second and third lines specify the itp file names of reagents and their number in the simulation box. The fourth line specifies the names of reactive beads and their functionality. The fifth line specifies the reaction between two beads and the maximum and minimum distance limit for beads that the reaction can take place within, the probability of the reaction, the type of the beads after the reaction, and the newly formed bond equilibrium and constant values. Also, the files 'new_angles_parameters.txt' and 'new_dihedrals_parameters.txt' should be edited and place all the input files in 'data' folder. The required files are uploaded in 'test_case/input_files' path.
The generation of initial topology files and equilibration of the simulation box is done by running 'scripts/run_first_relaxation_only.py'
cd scripts
python3 run_first_relaxation_only.py
In order to start the reactions, just run the file 'scripts/run_the_loops_only.py' and wait for the process to be executed.
python3 run_the_loops_only.py.py
As soon as the process meets the termination conditions (reaching the end loop or achieving the conversion limit) it will be stopped. Some example files of different loops during the process (first, 50th, 100th, and the last loop) are uploaded in 'test_case/outputs' path. The files 'undefined_angles.txt' and 'undefined_dihedrals.txt' consist of the newly formed angles and dihedrals that the user does not define in the input files. The chart of the conversion is depicted below.
conversion evolution