Working with reduced units(lj units) in LAMMPS

97 views
Skip to first unread message

Rajat Gupta

unread,
May 31, 2020, 7:47:22 AM5/31/20
to votca
Hello everyone,

I am new to using VOTCA and have some queries. I am working in coarse graining using VOTCA and used LAMMPS to generate my target RDF (in reduced units).

While going through ibi_lammps tutorial in VOTCA, I saw the unit conversion done for LAMMPS real units.

Can anyone please suggest me the changes I need to make in my "settings.xml" in order to perform IBI calculations and handle the lj units?

Thanks,
Rajat

Christoph Junghans

unread,
May 31, 2020, 8:13:48 AM5/31/20
to vo...@googlegroups.com
VOTCA always assumes lammps files are in angstroms even if they are in LJ units and then converts them to it's internal units, nm. And writes the rdf and potentials out in nm as well.
That means for a setup in LJ units the potential will be in LJ*(angstroms to nm conversion) [0.1].
Hence you a basically just have to scale the potential back to LJ units by scaling everything with a factor 10 using the "scale" parameter in the settings file. That covers the x axis, for the y axis you just have to set the 'kBT' parameter to the right unitless value for the temperature you are calculating. kBT is the only unit parameter used in ibi.

Christoph

Thanks,
Rajat

--
Join us on Slack: https://join.slack.com/t/votca/signup
---
You received this message because you are subscribed to the Google Groups "votca" group.
To unsubscribe from this group and stop receiving emails from it, send an email to votca+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/votca/0466c098-1257-4075-9b4d-91aa67dd2228%40googlegroups.com.

Rajat Gupta

unread,
Jun 7, 2020, 9:15:57 AM6/7/20
to votca
Thank you for the help, Christoph.

I tried making the changes suggested (Scale = 10; kBT=1) but I got the following error at step_001:

ERROR: Lost atoms: original 4096 current 0 (src/thermo.cpp:439)
Last command: run        10000

I am attaching my settings.xml and input file (sc.in) for reference.

Since my target RDF is also in reduced units (generated using LAMMPS), unlike gromacs units which was in spce-ibi_lammps tutorial, I next tried making changes by keeping the scale=1 (since both target RDF and lammps have same reduced units) and this time the lammps simulations ran but I got error while rdf calculations in step_001:

Calculating rdfs with csg_stat using 4 tasks
Running critical command 'csg_stat --nt 4 --options /home/rajat/Desktop/Inverse_Design/settings.xml --top input.data --trj traj.dump --begin 0 --first-frame 0'
begin to calculate distribution functions
# of bonded interactions: 0
# of non-bonded interactions: 1

WARNING: The votca lammps data reader is only able to read lammps files formatted in the following styles:
angle
atom
bond
full
molecule

These styles use the following formats in the atom block:
atom-ID molecule-ID atom-type charge x y z
atom-ID molecule-ID atom-type charge x y z nx ny nz
atom-ID molecule-ID atom-type x y z
atom-ID molecule-ID atom-type x y z nx ny nz
atom-ID atom-type x y z
atom-ID atom-type x y z nx ny nz
.
.
.
I have 4096 beads in 4096 molecules

Reading frame, timestep 10000
an error occurred:
The max of interaction "CG-CG" bigger is than half the box.

Callstack:
/home/rajat/share/votca/scripts/inverse/inverse.sh - linenumber 266
    do_external - linenumber 176 in /home/rajat/share/votca/scripts/inverse/functions_common.sh
        /home/rajat/share/votca/scripts/inverse/update_ibi.sh - linenumber 31
            for_all - linenumber 22 (see 'csg_call --cat function for_all')
                    do_external - linenumber 19 (see 'csg_call --cat function do_external')
                        /home/rajat/share/votca/scripts/inverse/calc_rdf_generic.sh - linenumber 84
                            critical - linenumber 4 (see 'csg_call --cat function critical')
                                die - linenumber 2 (see 'csg_call --cat function die')

I'm trying to perform IBI calculations for a simple cubic lattice. Is there anything that I'm missing or doing wrong?

Any help is appreciated.

Thanks,
Rajat
    On Sunday, May 31, 2020 at 5:43:48 PM UTC+5:30, Christoph Junghans wrote:


    On Sun, May 31, 2020, 05:47 Rajat Gupta <rajatgp...@gmail.com> wrote:
    Hello everyone,

    I am new to using VOTCA and have some queries. I am working in coarse graining using VOTCA and used LAMMPS to generate my target RDF (in reduced units).

    While going through ibi_lammps tutorial in VOTCA, I saw the unit conversion done for LAMMPS real units.

    Can anyone please suggest me the changes I need to make in my "settings.xml" in order to perform IBI calculations and handle the lj units?
    VOTCA always assumes lammps files are in angstroms even if they are in LJ units and then converts them to it's internal units, nm. And writes the rdf and potentials out in nm as well.
    That means for a setup in LJ units the potential will be in LJ*(angstroms to nm conversion) [0.1].
    Hence you a basically just have to scale the potential back to LJ units by scaling everything with a factor 10 using the "scale" parameter in the settings file. That covers the x axis, for the y axis you just have to set the 'kBT' parameter to the right unitless value for the temperature you are calculating. kBT is the only unit parameter used in ibi.

    Christoph

    Thanks,
    Rajat

    --
    Join us on Slack: https://join.slack.com/t/votca/signup
    ---
    You received this message because you are subscribed to the Google Groups "votca" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to vo...@googlegroups.com.
    sc.in
    settings.xml

    Christoph Junghans

    unread,
    Jun 7, 2020, 11:02:57 AM6/7/20
    to vo...@googlegroups.com
    On Sun, Jun 7, 2020 at 7:16 AM Rajat Gupta <rajatgp...@gmail.com> wrote:
    >
    > Thank you for the help, Christoph.
    >
    > I tried making the changes suggested (Scale = 10; kBT=1) but I got the following error at step_001:
    >
    > ERROR: Lost atoms: original 4096 current 0 (src/thermo.cpp:439)
    > Last command: run 10000
    >
    > I am attaching my settings.xml and input file (sc.in) for reference.
    >
    > Since my target RDF is also in reduced units (generated using LAMMPS), unlike gromacs units which was in spce-ibi_lammps tutorial, I next tried making changes by keeping the scale=1 (since both target RDF and lammps have same reduced units) and this time the lammps simulations ran but I got error while rdf calculations in step_001:

    That won't work, let me repeat what I said in my last email: VOTCA
    will scale the positions read from the dump file with a factor of 0.1
    (as VOTCA assumes dumps are in Angstroms, but works in nm internally).
    However, the target rdf is compared against the rdf calculated by
    csg_stat (in nm) hence the target rdf needs to be in nm as well,
    meaning scaled by 0.1 the units of the dump files.

    To summarize, if your simulation is in reduced units, which VOTCA
    reads from a dump file and then scales by 0.1, the target rdf needs to
    be scaled by 0.1 from the reduced units as well. Same for the number
    in settings.xml, they need to be scaled by 0.1 from your reduced
    units. And that would also explain "The max of interaction "CG-CG"
    bigger is than half the box." error below as the max is too big by a
    factor 10.

    Christoph
    > To unsubscribe from this group and stop receiving emails from it, send an email to votca+un...@googlegroups.com.
    > To view this discussion on the web visit https://groups.google.com/d/msgid/votca/a143a7e5-441a-43cb-bd93-34c4d1a6da14o%40googlegroups.com.



    --
    Christoph Junghans
    Web: http://www.compphys.de
    Reply all
    Reply to author
    Forward
    0 new messages