2017-02-16 13:29 GMT-07:00 Sikandar Mashayak <symasha...@gmail.com>:
>
>
> On Thu, Feb 16, 2017 at 2:23 PM, Christoph Junghans <jungh...@votca.org>
> wrote:
>>
>> 2017-02-16 13:05 GMT-07:00 Joshua Moore <jdmo...@ncsu.edu>:
>> > Hi Christoph,
>> >
>> > Thanks again.  I think I've implemented all your suggestions except for
>> >
>> > "If you want to allow a pressure file per-interaction add
>> > <pressure_file> to <lammps> block inside the <non-bonded> block
>> > and use
>> > p_file="$(csg_get_interaction_property inverse.lammps.pressure_file)" "
>> >
>> > I will have to think about that one.  I think just a single pressure
>> > makes
>> > sense, no?
>> Multi-component pressure correction is bit tricky. You would need the
>> contribution from each individual interaction.
>> The standard version of Gromacs cannot calculated that and hence we
>> just use the total pressure.
>
>
> Won't this cause extra counting/corrections to the multiple interactions,
> i.e., multiple pair potentials will be modified to correct the same pressure
> resulting in over corrections and hence, error.
You can use individual scaling factors (e.g. 0.25,0.5, 0.25) to
correct for that statically.

>
> I think, either the pressure correction should be added to only one
> interaction for a given iteration or use partial pressures corresponding to
> each interaction to compute the pressure corrections.
I usually prefer the former approach, too, but it doesn't work very
well if one of the two species is underrepresented and hence you
correct for a pressure, which mostly comes from a different
interaction.

Christoph
>
> Best,
> Sikandar
>
>>
>> You could also do a version where it fails back to total pressure,
>> something like:
>>  p_file="$(csg_get_interaction_property --allow-empty
>> inverse.lammps.pressure_file)"
>> [[ -z ${p_file] ]] && p_file="$(csg_get_interaction_property
>> inverse.lammps.pressure_file)"
>>
>> One more thing, please add documentation for new xml options to
>> share/xml/csg_defaults.xml.
>>
>> >
>> > The other issue was a typo.  Thanks for suggesting that.  I had
>> > <post_update></post_update> in twice, the second time, with nothing in
>> > it,
>> > so think it overrides the previous block.  Seems to be updating now.
>> Good that you found it, I have seen that problem before!
>>
>> Christoph
>> >
>> > I will do a pull request later today after a bit more testing, but I
>> > think
>> > it's ok now.
>> >
>> > Thanks.
>> >
>> > Josh
>> >
>> >
>> >
>> > On Thursday, February 16, 2017 at 1:46:29 PM UTC-5, Christoph Junghans
>> > wrote:
>> >>
>> >> 2017-02-16 10:20 GMT-07:00 Joshua Moore <jdm...@ncsu.edu>:
>> >> > Hi Christoph,
>> >> >
>> >> > I think I have it basically working now, but I might be having a few
>> >> > issues.
>> >> > Here is what I did
>> >> >
>> >> > 1) I created a calc_pressure_lammps.sh file as you suggested.  It is
>> >> > attached, but it is basically just calculating the average of a
>> >> > column
>> >> > of
>> >> > pressures I've outputted from LAMMPS using awk and assigning this to
>> >> > the
>> >> > p_new variable.  I have hard coded the name of the lammps file
>> >> > (called
>> >> > lammps.pressure), as I wasn't sure how this could be read into the
>> >> > script.
>> >> Nice, it looks very good!
>> >>
>> >> I would add an option to xml file in lammps block, e.g.
>> >> <cg>
>> >>   ...
>> >>   <inverse>
>> >>    <lammps>
>> >>       ...
>> >>       <traj>traj.dump</traj>
>> >>       ...
>> >>       <pressure_file>lammps.pressure</pressure_file>
>> >>     </lammps>
>> >>   </inverse>
>> >> </cg>
>> >> and then you can read its value inside the script using:
>> >> p_file="$(csg_get_property cg.inverse.lammps.pressure_file)"
>> >> If you want to allow a pressure file per-interaction add
>> >> <pressure_file> to <lammps> block inside the <non-bonded> block
>> >> and use
>> >> p_file="$(csg_get_interaction_property inverse.lammps.pressure_file)"
>> >>
>> >> In addition, I would check if the pressure file exists before invoking
>> >> awk:
>> >> [[ -f ${p_file} ]] || die "${0##*/}: pressure file '${p_file}" doesn't
>> >> exist"
>> >> and check that awk actually ran correctly:
>> >> p_now=$(...) || die "${0##*/}: pressure averaging failed"
>> >>
>> >> (Note "${0##*/}" is just the name of the script)
>> >> >
>> >> > 2)
>> >> > Added "pressure lammps calc_pressure_lammps.sh" in csg_table below
>> >> > "pressure
>> >> > gromacs calc_pressure_gromacs.sh"
>> >> >
>> >> > 3) Commented out in postupd_pressure.sh this line
>> >> >
>> >> > #[[ $sim_prog != gromacs ]] && die "${0##*/}: pressure correction for
>> >> > ${sim_prog} is not implemented yet!"
>> >> I would change it to that:
>> >> [[ $sim_prog != @(gromacs|lammps) ]] && die "${0##*/}: pressure
>> >> correction for ${sim_prog} is not implemented yet!"
>> >> so that it only works for lammps and gromacs
>> >>
>> >> Can you do a pull request with these changes?
>> >> Details:
>> >>
>> >> <https://github.com/votca/csg/wiki/BugFix#for-users-contribute-a-bug-fix>
>> >>
>> >> >
>> >> > 4) It seems to be running and the pressure appears to be improving.
>> >> > I
>> >> > have
>> >> > 3 bead types for the hexane example, and 3 interactions, A-A, B-B,
>> >> > and
>> >> > A-B.
>> >> > VOTCA is only writing a A-A.pressure and a A-B.pressure file.  It
>> >> > doesn't
>> >> > seem to be writing a B-B.pressure file, so I'm not sure if it is
>> >> > updating
>> >> > the B-B interaction??
>> >> That is a bit more tricky. I am guessing there is a typo in the xml
>> >> file, but I will look more in detail later.
>> >> I would look for the output and check:
>> >> - if the IBI update itself done for A-B
>> >> - if pressure is listed as a Post-update for the A-B interaction
>> >> - check inverse.log if calc_pressure_lammps.sh is called for A-B at
>> >> all.
>> >>
>> >> Christoph
>> >> >
>> >> > I am attaching the settings.xml file where I am calling for the
>> >> > pressure
>> >> > correction.  Can you take a look to see if it is defined correctly
>> >> > there?
>> >> >
>> >> > In the *tar.gz I am attaching my current version of the ibi for
>> >> > LAMMPS
>> >> > with
>> >> > real units and pressure correction.
>> >> >
>> >> > Thanks again for all your help.
>> >> >
>> >> > Josh
>> >> >
>> >> >
>> >> > On Wednesday, February 15, 2017 at 11:05:47 AM UTC-5, Joshua Moore
>> >> > wrote:
>> >> >>
>> >> >> Hello,
>> >> >>
>> >> >> It appears the pressure correction for LAMMPS is not implemented.
>> >> >>
>> >> >> I saw this post by Frank
>> >> >>
>> >> >> https://groups.google.com/d/msg/votca/Jxsdz6v9QKw/OUVfYan8CwAJ
>> >> >>
>> >> >> It seems like in order to make it work, you would just have to feed
>> >> >> in
>> >> >> the
>> >> >> pressure from LAMMPS.
>> >> >>
>> >> >> What would be required for this?
>> >> >>
>> >> >> Could I have LAMMPS output an average pressure, and then this could
>> >> >> be
>> >> >> fed
>> >> >> into pressure_cor_simple.pl as my $p_now=$ARGV[0]; ??
>> >> >>
>> >> >> How does Gromacs do it?  Does Gromacs calculate an average pressure
>> >> >> and
>> >> >> that is fed in as $ARGV[0] into the perl script?
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >> Josh
>> >> >
>> >> > --
>> >> > 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 post to this group, send email to vo...@googlegroups.com.
>> >> > Visit this group at https://groups.google.com/group/votca.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> >>
>> >> --
>> >> Christoph Junghans
>> >> Web: http://www.compphys.de
>> >
>> > --
>> > 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+unsubscr...@googlegroups.com.
>> > To post to this group, send email to votca@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/votca.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Christoph Junghans
>> Web: http://www.compphys.de
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to votca@googlegroups.com.
>> Visit this group at https://groups.google.com/group/votca.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to votca@googlegroups.com.
> Visit this group at https://groups.google.com/group/votca.
> For more options, visit https://groups.google.com/d/optout.



-- 
Christoph Junghans
Web: http://www.compphys.de

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to votca@googlegroups.com.
Visit this group at https://groups.google.com/group/votca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to