On Dec 26, 2016, at 7:37 PM, Axel Kohlmeyer <[email protected]> wrote:On Mon, Dec 26, 2016 at 9:28 PM, Martinez Saez, Enrique <[email protected]> wrote:I guess that my problem is that i tried create bonds between groups and assign coefficients but the code checks for bond assignment (in bond.cpp) somewhere in between, which results in an error. I tried to comment that line but I was getting nan's. Maybe is just something in my input where i do all the assignments, different from the one i sent before. I'll keep trying to find the issue in my input file.you are not paying attention.you are creating just one type (don't confuse this with "style") of bond, that means, there is just one set of parameters for *all* bonds.with bond style harmonic, that means *all* bonds have the *same* parameters (k and r0).if you want those to be defined with an atom style variable, you *add* that support to your bond style implementation.also, as mentioned before, you *cannot* use $ expansion on atom style variables. it doesn't make sense, since those don't resolve to a single global value.this is the last time, i'm repeating this. so please take note, and have a closer look at the documentation than before. it is all there.thanks for your understanding,axel.
Thanks
EnriqueFrom: Axel Kohlmeyer <[email protected]>
Sent: Monday, December 26, 2016 7:16:37 PM
To: Martinez Saez, Enrique
Cc: Steve Plimpton; lammps-users@lists.sourceforge.net
Subject: Re: [lammps-users] about harmonic bondsOn Mon, Dec 26, 2016 at 9:04 PM, Martinez Saez, Enrique <[email protected]> wrote:I’m not sure how compatible is your answer with Steve’s but in any case, why can’t I define a type of bond between 2 groups of atoms? And do that for as many groups as I want?my answer is 100% compatible with steve'sbond types are assigned to bonds, not atoms. if you want a particular set of coefficients to be assigned to bonds between two groups of atoms, you will have to suitably create/define those bonds so they have a unique type and then assign the parameters to that bond type. this is all very logical and straightforward. what you are asking for to do directly is very unusual instead.basically, you want to do things backwards. it *can* be realized, but that requires that you write your own code that matches bond parameters for individual bonds from some kind of table based on atom IDs. this is far from trivial, and as steve indicated, that would make the individual bond type assignment irrelevant (hence the '*').There is something about the definition of a bond that I am not understanding, I guess.LAMMPS uses the same kind of bond topology definition and bond type parameter assignment than most classical MD codes have.please have a closer look at the documentation of data files in the read_data documentation.axel.Thanks,----------------------------------------
Enrique Martinez Saez
MST-8, MS G755
Los Alamos National Laboratory
Los Alamos, NM, 87544
Ph: 505 606 2149
Fax: 505 667 8021
[email protected]
http://enriquemasa.snack.wsOn Dec 26, 2016, at 3:37 PM, Axel Kohlmeyer <[email protected]> wrote:On Mon, Dec 26, 2016 at 3:53 PM, Martinez Saez, Enrique
<[email protected]> wrote:I’m sure I’m doing something stupid but I can’t make it to work. Even with
bond_harmonic I don’t see where the code substitutes the variable. I am
attaching a small input file that reproduces the error.
there are two issues.
1) you are trying to use '//' to comment out a line. that is not
supported. the comment character in LAMMPS is '#'
2) you are trying to expand an atom style variable in the input. that
is not supported and doesn't make sense. you need a variable that
evaluates to a global value (equal style, index style, python style,
string style).
what you are trying to do is illogical. bonds in LAMMPS are explicit
and not related to per-atom properties.
axel.I’m using 17 Dec 2016 version.
Maybe you meant that the variable substitution should be implemented.
Thanks,
Enrique
------------------------------------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
[email protected].net
https://lists.sourceforge.net/lists/listinfo/lammps-users
--
Dr. Axel Kohlmeyer [email protected] http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.--Dr. Axel Kohlmeyer [email protected] http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.--Dr. Axel Kohlmeyer [email protected] http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.