problems with fix bond/create for cross linking polymer systems

Hi all,

I am trying to cross-link bead-spring polymer system using fix bond/create. I have generated the polymer melt data file using pcff force field and update the header as:
11 atoms types
16 bond types
28 angle types
33 dihedral types
21 improper types

4 extra bond per atom

Now, after equilibrating the structure, I am trying to cross-link it using

special_bonds lj 0 1 1 extra 17
fix 1 all bond/create 1 11 9 3.0 17 iparam 4 12 jparam 3 13 prob 0.5 85784

But, I am getting an error in lammps as:
Illegal special_bonds command<…/force.cpp:852>

I am using LAMMPS 64-bit 2Aug2018-MPI version.
Please help me with this.
I am attaching my data file also with this mail.

2-1.data (59.2 KB)

I am trying to cross-link bead-spring polymer system using fix bond/create. I have generated the polymer melt data file using pcff force field and update the header as:
11 atoms types
16 bond types
28 angle types
33 dihedral types
21 improper types
4 extra bond per atom

Now, after equilibrating the structure, I am trying to cross-link it using
special_bonds lj 0 1 1 extra 17

The "special_bonds" command does not understand "extra 17"
The documentation for this command is here:
https://lammps.sandia.gov/doc/special_bonds.html

Perhaps you were thinking of read_data? Example:

read_data YOUR_FILE.data extra/bond/per/atom 17

From the docs: "Using the extra/special/per/atom keyword to either

read_data or create_boxreserves empty space in the list for this N
additional 1st, 2nd, or 3rd neighbors to be added. If you do not do
this, you may get an error when bonds (or molecules) are added."

Cheers

Andrew

Thanks. But it is not working.

I have tried all the possibility like adding:
“4 extra bond per atom
17 extra bond types” in the header of the data file.
I have also tried with read_data filename.data extra/bond/per/atom 4 or extra/bond/types 17 or extra/special/per/atom 17 or with all three. But none of these works.
(Here, I get an error: "Invalid bond type in fix bond/create).

Then, I go with special_bonds lj 01 1 extra 17 using the reference https://lammps.sandia.gov/threads/msg62957.html

The problem is:
I have already 16 bond types in my data file and I want to cross-link atom type 11 with atom type 9 and want to give it a new bond type 17. It was a totally new bond type that’s why it is given a new bond type 17. Then, I want to write my new data file with cross-linked structure.

2-1.data (59.2 KB)

Thanks for your reply but it is not working.

I have tried all the possibility like adding:

"4 extra bond per atom

17 extra bond types" in the header of the data file.
I have also tried with read_data filename.data extra/bond/per/atom 4 or extra/bond/types 17 or extra/special/per/atom 17 or with all three. But none of these works.
(Here, I get an error: "Invalid bond type in fix bond/create).

Then, I go with special_bonds lj 01 1 extra 17 using the reference https://lammps.sandia.gov/threads/msg62957.html

The problem is:
I have already 16 bond types in my data file and I want to cross-link atom type 11 with atom type 9 and want to give it a new bond type 17. It was a totally new bond type that’s why it is given a new bond type 17. Then, I want to write my new data file with cross-linked structure.

I am attaching my data file and input file bot with this mail. Please help me.

2-1.data (59.2 KB)

crosslinking.in (2.45 KB)

As Andrew said, the special_bonds command does not have an extra keyword.
Possibly it did at some previous point in time (e.g. the mail list message you reference),
but it does not now. So don’t use that.

Second, if you have 16 bond types and want to add a new one for cross-linked bonds
then the data file command is 1 extra/bond/types, not 17 extra/bond/types. Either
as an option on the read_data command in your input script, or in the header of the
data file itself.

See if that works with your version of LAMMPS (hopefully current), and if not
please post the error message and a small example that triggers it.

Steve

Thank you Dr. Steeve.
I tried it with extra/bond/types 1.

I read the manual again. I read about all the commands I am using, in details, so that I cannot trouble you unnecessarily. But, unfortunately I am unable to run it.

When i tried the script with extra/bond/types 1 with read_data command. I get an error message “All bond coeffs are not set”.

I thought may be I need to provide bond coeffs for bond type 17, which is going to create with fix bond/create command. So, i added that too in the data file. After adding that, I am getting an error “Unknown identifier in data file”.

You asked for small example. My input script is already a small example. I am taking 2 monomer of EPON-862 and curing it with 1 monomer of DETDA. All the three monomers are packed in a crystal and well equilibrated. The data file has already 16 bond types and the atom type 11 is making bond with atom type 9. The new bond type (formed after cross-linking) is assigned as bond type 17. Rmin is taken as 3.0.

My input script is:

clear
echo screen

units real
atom_style full

pair_style lj/class2 15.0
pair_modify mix geometric
bond_style class2
angle_style class2
improper_style class2
dihedral_style class2
special_bonds lj 0 1 1

read_data 2-1.data extra/bond/types 1 #extra/special/per/atom 17

thermo 10
thermo_style custom step temp press density bonds angles dihedrals impropers pe etotal
fix 1 all langevin 500.0 500.0 0.5 15897
fix 2 all nve
fix 3 all bond/create 10 11 9 3.0 17 iparam 1 11 jparam 1 9 prob 0.5 85784 #iparam 4 11 japaram 3 9 prob 0.5 85784
reset_timestep 0
timestep 0.1
run 2000
unfix 1
unfix 2
unfix 3

minimize 1.0e-15 1.0e-15 50000 1000000

write_restart 1.restart
write_data 1.data

I am not getting what still I am doing wrong.
I am attaching my data file and input script also with this mail.

2-1.data (59.1 KB)

crosslinking.in (2.8 KB)

Thank you Dr. Steeve.
I tried it with extra/bond/types 1.

I read the manual again. I read about all the commands I am using, in details, so that I cannot trouble you unnecessarily. But, unfortunately I am unable to run it.

When i tried the script with extra/bond/types 1 with read_data command. I get an error message “All bond coeffs are not set”.

yes. because you added the type, but no parameters.

I thought may be I need to provide bond coeffs for bond type 17, which is going to create with fix bond/create command. So, i added that too in the data file. After adding that, I am getting an error “Unknown identifier in data file”.

that makes no sense. if you add a line to BondCoeffs, you MUST also increase the “bond types” entry in the header or else you get the error you saw, and then you won’t need the extra/bond/types keyword anymore. this keyword is meant for the case, where you do NOT want to modify the data file or would be reading in a second data file (with offsets). otherwise you MUST use the bond_coeff keyword in the input file to set the parameters for the extra bond type.

axel.