delete_atoms in polymers: no renumbering of indices?

Hi all,

first I’d like to apologize if this question has already been answered in the mailing list. I havent found anything helpful…

Im simulating a polymerization of 2 molecules using a class2-Force-field (pcff). Creation of new bonds/angles/… is not a big deal…A simple python script does it for me. In addition, 2 atoms from each of the molecules are deleted with corresponding bonds,angles,dihedrals…

Im doing this using lammps: delete_atoms group delgroup bond yes compress yes

However, i noticed that atom ids,bond ids,… are not renumbered. I’ve written a python script to do this, but unfortunately it is way too slow for big systems. I’ve even converted the source to cpp and compiled it…that gave me a 10-fold speedup, but its still too slow. The next step would be coding parallel, but i really dont wanna do that.

Is there a way to achieve that renumberig within lammps?
If so, pls give me an advice.

regards,
frank.

Hi All

I am trying to use coarse grain and of course I am using angle style sdk

However I got error:

ERROR: Unknown angle style (…/force.cpp:371)

So I guess I am missing a package or patch. Does anyone
see the same situation? Advice is greately appreciated.

Thanks

Alex

You probably have the wrong arguments or have not defined angle style in your input file.

ex. angle_style harmonic

Michael Goytia
Graduate Student
University of Utah Chemistry Department

this is a new question and has nothing to do with the original
question about deleting atoms.
please respect common mailing list courtesy and send a new e-mail with
a suitable subject line rather than "hijacking" an existing thread.

Hi All

I am trying to use coarse grain and of course I am using angle style sdk

However I got error:

ERROR: Unknown angle style (../force.cpp:371)

So I guess I am missing a package or patch. Does anyone
see the same situation? Advice is greately appreciated.

have you looked at the documentation? if you read far enough to the
bottom of the documentation of that specific angle style, you should
find the answer you are looking for.

axel.

Hi all,

first I'd like to apologize if this question has already been answered in
the mailing list. I havent found anything helpful...

Im simulating a polymerization of 2 molecules using a class2-Force-field
(pcff). Creation of new bonds/angles/... is not a big deal..A simple python
script does it for me. In addition, 2 atoms from each of the molecules are
deleted with corresponding bonds,angles,dihedrals....

Im doing this using lammps: delete_atoms group delgroup bond yes compress
yes

However, i noticed that atom ids,bond ids,... are not renumbered. I've
written a python script to do this, but unfortunately it is way too slow for
big systems. I've even converted the source to cpp and compiled it..that
gave me a 10-fold speedup, but its still too slow. The next step would be
coding parallel, but i really dont wanna do that.

Is there a way to achieve that renumberig within lammps?

what do you need the renumbering for? is there any negative impact on
your simulation if you do not renumber?

axel.

Hi axel,

Im using a perl script called polymatic for polymerization and crosslinking. The script raises an error and quits in case there are gaps in IDs. My perl-skills are not good enough to modify the script and I dont have time to learn it. Maybe its possible using vmd/tcl? what do you think,is it worth a try?

frank.

Hi all,

first I’d like to apologize if this question has already been answered in
the mailing list. I havent found anything helpful…

Im simulating a polymerization of 2 molecules using a class2-Force-field
(pcff). Creation of new bonds/angles/… is not a big deal…A simple python
script does it for me. In addition, 2 atoms from each of the molecules are
deleted with corresponding bonds,angles,dihedrals…

Im doing this using lammps: delete_atoms group delgroup bond yes compress
yes

However, i noticed that atom ids,bond ids,… are not renumbered. I’ve
written a python script to do this, but unfortunately it is way too slow for
big systems. I’ve even converted the source to cpp and compiled it…that
gave me a 10-fold speedup, but its still too slow. The next step would be
coding parallel, but i really dont wanna do that.

Is there a way to achieve that renumberig within lammps?

what do you need the renumbering for? is there any negative impact on
your simulation if you do not renumber?

axel.

Hi axel,

Im using a perl script called polymatic for polymerization and
crosslinking. The script raises an error and quits in case there are gaps in
IDs. My perl-skills are not good enough to modify the script and I dont have
time to learn it. Maybe its possible using vmd/tcl? what do you think,is it
worth a try?

sorry, i am confused. first you talk about a python script, now you
talk about a perl script.
...and if the script already does the processing, why do you need
LAMMPS to delete atoms?

now you ask about vmd/tcl scripting, but also you already mention that
your python script and C++ code are too slow. how is Tcl scripting
going to be any better? if there is any significant way to speed up
the processing, then this would only be due to algorithmic changes,
i.e. if your code is doing some operation that scales badly with
system size and can be replaced with an alternate approach that has
better scaling behavior. there are likely ways to implement this (in
any script or compiled language), but that will require significant
coding. so the way i see it, you have three options:
- bite the bullet and just wait it out
- contract somebody that does your coding for you
- teach yourself programming skills that you are still missing to do it yourself

axel.

Hi,

> Im using a perl script called polymatic for polymerization and
> crosslinking. The script raises an error and quits in case there are gaps in
> IDs. My perl-skills are not good enough to modify the script and I dont have
> time to learn it. Maybe its possible using vmd/tcl? what do you think,is it
> worth a try?

sorry, i am confused. first you talk about a python script, now you
talk about a perl script.
...and if the script already does the processing, why do you need
LAMMPS to delete atoms?

now you ask about vmd/tcl scripting, but also you already mention that
your python script and C++ code are too slow. how is Tcl scripting
going to be any better? if there is any significant way to speed up
the processing, then this would only be due to algorithmic changes,
i.e. if your code is doing some operation that scales badly with
system size and can be replaced with an alternate approach that has
better scaling behavior. there are likely ways to implement this (in
any script or compiled language), but that will require significant
coding. so the way i see it, you have three options:
- bite the bullet and just wait it out
- contract somebody that does your coding for you
- teach yourself programming skills that you are still missing to do it yourself

Also have a look at http://lammps.sandia.gov/doc/fix_bond_break.html and
http://lammps.sandia.gov/doc/fix_bond_create.html

LAMMPS can already perform modeling of polymerization processes! No perl
required :slight_smile:

Pierre

PS: Axel, I like the idea to have MD contractors! Instead of building houses,
those contractors would build MD models :slight_smile:

[...]

PS: Axel, I like the idea to have MD contractors! Instead of building houses,
those contractors would build MD models :slight_smile:

if scientists had more practical sense, that would be a thriving
business. especially, these days when more and more people do
simulations, but at the same time the average technical knowledge
about programming and simulation tools is at a low.

unfortunately, it is no business at all. in fact, i found asking
people to pay me a contractor/consultant fee for doing what is
essentially their own job, to be one of the most reliable ways to shut
them off. when i see how many resources and particularly people hours
are wasted in our field simply because people are not properly trained
or don't invest any effort in having effective and suitable tools for
their work, i have to shake my head so much i fear it will come off.

axel.

thanks for your advices, I’ll try to create bonds using lammps instead of using the perl-script.

p.s. : I’d really like to improve my programming skills. However, I’m not a scientist…I’m just a student and this is for my master-thesis. Its quite risky to spend weeks or even months for trying it myself…

regards,
frank.

Im using a perl script called polymatic for polymerization and
crosslinking. The script raises an error and quits in case there are gaps in
IDs. My perl-skills are not good enough to modify the script and I dont have
time to learn it. Maybe its possible using vmd/tcl? what do you think,is it
worth a try?

sorry, i am confused. first you talk about a python script, now you
talk about a perl script.
…and if the script already does the processing, why do you need
LAMMPS to delete atoms?

now you ask about vmd/tcl scripting, but also you already mention that
your python script and C++ code are too slow. how is Tcl scripting
going to be any better? if there is any significant way to speed up
the processing, then this would only be due to algorithmic changes,
i.e. if your code is doing some operation that scales badly with
system size and can be replaced with an alternate approach that has
better scaling behavior. there are likely ways to implement this (in
any script or compiled language), but that will require significant
coding. so the way i see it, you have three options:

  • bite the bullet and just wait it out
  • contract somebody that does your coding for you
  • teach yourself programming skills that you are still missing to do it yourself

Also have a look at http://lammps.sandia.gov/doc/fix_bond_break.html and
http://lammps.sandia.gov/doc/fix_bond_create.html

LAMMPS can already perform modeling of polymerization processes! No perl
required :slight_smile:

Pierre

PS: Axel, I like the idea to have MD contractors! Instead of building houses,
those contractors would build MD models :slight_smile:

thanks for your advices, I'll try to create bonds using lammps instead of
using the perl-script.

p.s. : I'd really like to improve my programming skills. However, I'm not a
scientist...I'm just a student and this is for my master-thesis. Its quite
risky to spend weeks or even months for trying it myself...

best you complain to the person overseeing your thesis. unfortunately
it has become common practice to put students on assignments that they
are not properly trained for and without proper oversight and tools or
help to adjust the tools as needed. i consider this irresponsible
behavior of the advisers. but unless people start to complain and
raise awareness, advisers are not likely to change (since it seems to
be working).

axel.

Pierre said:

"Also have a look at http://lammps.sandia.gov/doc/fix_bond_break.html and
http://lammps.sandia.gov/doc/fix_bond_create.html

LAMMPS can already perform modeling of polymerization processes! No perl
required :slight_smile:

Pierre"

By the way: lammps does not support creating new class2 impropers (yet) …

ERROR: Cannot yet use fix bond/create with this improper style

I’ll ask my advisor to help me coding.

Thank you very much for your advices,

frank.

thanks for your advices, I’ll try to create bonds using lammps instead of
using the perl-script.

p.s. : I’d really like to improve my programming skills. However, I’m not a
scientist…I’m just a student and this is for my master-thesis. Its quite
risky to spend weeks or even months for trying it myself…

best you complain to the person overseeing your thesis. unfortunately
it has become common practice to put students on assignments that they
are not properly trained for and without proper oversight and tools or
help to adjust the tools as needed. i consider this irresponsible
behavior of the advisers. but unless people start to complain and
raise awareness, advisers are not likely to change (since it seems to
be working).

axel.

Forgive me in advance for my unrelated LAMMPS blurb below. Will try to pay back soon by responding some Qs on the forum. Note as well I am not the original poster of this thread.

I did it :slight_smile:

I’ve changed dihedral_style to harmonic for crosslinking.

Thanks for the hints

regards,
frank.

"Also have a look at http://lammps.sandia.gov/doc/fix_bond_break.html and
http://lammps.sandia.gov/doc/fix_bond_create.html

LAMMPS can already perform modeling of polymerization processes! No perl
required :slight_smile:

Pierre"

By the way: lammps does not support creating new class2 impropers (yet) …

ERROR: Cannot yet use fix bond/create with this improper style

I’ll ask my advisor to help me coding.

Thank you very much for your advices,

frank.

thanks for your advices, I’ll try to create bonds using lammps instead of
using the perl-script.

p.s. : I’d really like to improve my programming skills. However, I’m not a
scientist…I’m just a student and this is for my master-thesis. Its quite
risky to spend weeks or even months for trying it myself…

best you complain to the person overseeing your thesis. unfortunately
it has become common practice to put students on assignments that they
are not properly trained for and without proper oversight and tools or
help to adjust the tools as needed. i consider this irresponsible
behavior of the advisers. but unless people start to complain and
raise awareness, advisers are not likely to change (since it seems to
be working).

axel.

Axel’s post is the key Q for the original posted Q.

LAMMPS in general does not care if your atom IDs are numbered

consecutively. Just be sure you are using atom_map hash if the

IDs get too big. LAMMPS also does not store bond, angle, etc IDs.

The numbers you are thinking are IDs in the data file are ignored.

They are simply part of the syntax to help you enumerate the bonds,

angles, etc.

Steve

axel said:

“what do you need the renumbering for? is there any negative impact on
your simulation if you do not renumber?”

I just recognized that velocity create requires consecutive IDs

Axel’s post is the key Q for the original posted Q.

LAMMPS in general does not care if your atom IDs are numbered

consecutively. Just be sure you are using atom_map hash if the

IDs get too big. LAMMPS also does not store bond, angle, etc IDs.

The numbers you are thinking are IDs in the data file are ignored.

They are simply part of the syntax to help you enumerate the bonds,

angles, etc.

Steve