user specified scripts

13 views
Skip to first unread message

Sikandar Mashayak

unread,
Aug 7, 2011, 5:04:17 PM8/7/11
to vo...@googlegroups.com
Hi

I am planning to customize csg scripts. I read the customization section of manual. In the customization section, procedure to modify and call the scripts which are executed by running "csg_call" command is described. I am trying to figure out how does it work. Does csg_call command first look for scripts ( defined by keys in csg_table) in user specified directory and then look in default/original installation dir, so that I can have two scripts with same name but different operations and in different locations? and depending upon whether I specify user directory or not appropriate script will be called.

Also, to my understanding, I can not use the same procedure if I were to modify inverse.sh script, right? Will I have to hard-code the path of modified inverse.sh in csg_inverse script, since I don't want to touch original inverse.sh in default location.

thanks
sikandar

Mara Jochum

unread,
Aug 8, 2011, 3:36:01 AM8/8/11
to vo...@googlegroups.com
> Does csg_call command first look for scripts ( defined by keys in
csg_table) in user specified directory
> and then look in default/original installation dir, so that I can have
two scripts with same name but different
> operations and in different locations?

Yes. As long as the user directory is specified under "scriptpath" in
the options xml file, it will look there first.
Be sure to have a separate csg_table file in this directory containing
the two keywords and name of the script
which you want to include. For example, if you want to modify
inverse.sh, you would:

- Make a copy of the script you want to modify (inverse.sh)
- Add a csg_table which contains the keywords and scriptname of the
modified script
(i.e. csg master inverse.sh)
- Provide the path to the directory which contrains your new script (and
csg_table) to the xml file

Hope this helps,

- Mara

Christoph Junghans

unread,
Aug 8, 2011, 4:20:53 AM8/8/11
to vo...@googlegroups.com
Hi Sikandar,

everything Mara said was right, except for the fact that inverse.sh is
one of the scripts, where overloading is not supported. The main
reason for this is, that inverse.sh is a complete script in itself. So
if you really want to change it, you can execute a modified copy.

Usually there is no need to change inverse.sh. What do you actually want to do?
If you want to skip something like post update or post add you can
just overload post_update_generic.sh or
post_add.sh with dummy.sh.

Cheers,

Christoph

2011/8/8 Mara Jochum <joc...@mpip-mainz.mpg.de>:

> --
> You received this message because you are subscribed to the Google Groups "votca" group.
> To post to this group, send email to vo...@googlegroups.com.
> To unsubscribe from this group, send email to votca+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/votca?hl=en.
>
>

--
Dr. Christoph Junghans
Votca Core Developer

Web: http://www.votca.org

Sikandar Mashayak

unread,
Aug 9, 2011, 12:48:07 AM8/9/11
to vo...@googlegroups.com
Thanks Mara and Christoph for clarifications.

I was trying to use csg_inverse command just to run one CG-MD simulation using given table.xvg for CG potentials. As Christoph suggested, I guess, I don't have to modify inverse.sh script; instead I just need to replace some update, prepare etc. scripts with appropriate scripts and overload post_update, post_add scripts with dummy.sh.

thanks
sikandar
Reply all
Reply to author
Forward
0 new messages