[gmx-users] problem in running job.sh for free energy calculations.

neelam wafa neelam.wafa at gmail.com
Mon Apr 9 18:58:50 CEST 2018


Hi

This is how I modified the job.sh script

#!/bin/bash

# Set some environment variables
FREE_ENERGY=/home/Downloads/Free_Energy
echo "Free energy home directory set to $FREE_ENERGY"

MDP=$FREE_ENERGY/MDP
echo ".mdp files are stored in $MDP"

LAMBDA=0

# A new directory will be created for each value of lambda and
# at each step in the workflow for maximum organization.

mkdir Lambda_$LAMBDA
cd Lambda_$LAMBDA

#################################
# ENERGY MINIMIZATION 1: STEEP  #
#################################
echo "Starting minimization for lambda = $LAMBDA..."

mkdir EM_1
cd EM_1

# Iterative calls to grompp and mdrun to run the simulations

gmx grompp -f $MDP/EM/em_steep_$LAMBDA.mdp -c
$FREE_ENERGY/Methane/methane_water.gro -p $FREE_ENERGY/Methane/topol.top -o
min$LAMBDA.tpr

mdrun -nt 2 -deffnm min$LAMBDA

sleep 10

#################################
# ENERGY MINIMIZATION 2: L-BFGS #
#################################

cd ../
mkdir EM_2
cd EM_2

# We use -maxwarn 1 here because grompp incorrectly complains about use of
a plain cutoff; this is a minor issue
# that will be fixed in a future version of Gromacs
gmx grompp -f $MDP/EM/em_l-bfgs_$LAMBDA.mdp -c ../EM_1/min$LAMBDA.gro -p
$FREE_ENERGY/Methane/topol.top -o min$LAMBDA.tpr -maxwarn 1

# Run L-BFGS in serial (cannot be run in parallel)

mdrun -nt 1 -deffnm min$LAMBDA

echo "Minimization complete."

sleep 10

#####################
# NVT EQUILIBRATION #
#####################
echo "Starting constant volume equilibration..."

cd ../
mkdir NVT
cd NVT

gmx grompp -f $MDP/NVT/nvt_$LAMBDA.mdp -c ../EM_2/min$LAMBDA.gro -p
$FREE_ENERGY/Methane/topol.top -o nvt$LAMBDA.tpr

mdrun -nt 2 -deffnm nvt$LAMBDA

echo "Constant volume equilibration complete."

sleep 10

#####################
# NPT EQUILIBRATION #
#####################
echo "Starting constant pressure equilibration..."

cd ../
mkdir NPT
cd NPT

gmx grompp -f $MDP/NPT/npt_$LAMBDA.mdp -c ../NVT/nvt$LAMBDA.gro -p
$FREE_ENERGY/Methane/topol.top -t ../NVT/nvt$LAMBDA.cpt -o npt$LAMBDA.tpr

mdrun -nt 2 -deffnm npt$LAMBDA

echo "Constant pressure equilibration complete."

sleep 10

#################
# PRODUCTION MD #
#################
echo "Starting production MD simulation..."

cd ../
mkdir Production_MD
cd Production_MD

gmx grompp -f $MDP/Production_MD/md_$LAMBDA.mdp -c ../NPT/npt$LAMBDA.gro -p
$FREE_ENERGY/Methane/topol.top -t ../NPT/npt$LAMBDA.cpt -o md$LAMBDA.tpr

mdrun -nt 2 -deffnm md$LAMBDA

echo "Production MD complete."

# End
echo "Ending. Job completed for lambda = $LAMBDA"



On Mon, Apr 9, 2018 at 4:56 PM, neelam wafa <neelam.wafa at gmail.com> wrote:

> Thanks Sir for your quick response.
> These are the errors I am getting.
> Error in user input:
> Invalid command-line options
>   In command-line option -f
>     File '/home/Downloads/Free_Energy/MDP/EM/em_steep_0.mdp' does not
> exist or
>     is not accessible.
>   In command-line option -c
>     File '/home/Downloads/Free_Energy/Methane/methane_water.gro' does not
>     exist or is not accessible.
>   In command-line option -p
>     File '/home/Downloads/Free_Energy/Methane/topol.top' does not exist
> or is
>     not accessible.
> job.sh: line 30: mdrun: command not found
>
>
> Error in user input:
> Invalid command-line options
>   In command-line option -f
>     File '/home/Downloads/Free_Energy/MDP/NVT/nvt_0.mdp' does not exist
> or is
>     not accessible.
>   In command-line option -p
>     File '/home/Downloads/Free_Energy/Methane/topol.top' does not exist
> or is
>     not accessible.
>
> For more information and tips for troubleshooting, please check the GROMACS
> website at http://www.gromacs.org/Documentation/Errors
> -------------------------------------------------------
> job.sh: line 65: mdrun: command not found
>
> similar errors I get for all the sets.
>
> Regards
> Neelam Wafa
>
>
>
>
> On Mon, Apr 9, 2018 at 3:30 PM, Justin Lemkul <jalemkul at vt.edu> wrote:
>
>>
>>
>> On 4/9/18 11:25 AM, neelam wafa wrote:
>>
>>> Dear sir Justin
>>>
>>> I am doing your tutorial of free energy calculations for methane in
>>> water.
>>> I have created the .mdp  and  .sh files using the perl script you
>>> provided.
>>> I have also made the FREE_ENERGY and MDP directories as in the job. sh
>>> script. gro file and topology files are also in the relevant folder but
>>> when I run job.sh script with command bash job.sh, it says the files the
>>> .mdp file, the methane_water.gro file and topol.top file either dont
>>> exist
>>> or not accessible. I have checked the files are in their proper places
>>> and
>>> are searched on terminal and opened though comand with vi editor. I have
>>> also given chmod 777 permission to these files. but no way out of the
>>> problem. please help me out. I have been searching the archive and google
>>> for the last three days but could not sort out. When i run the grompp and
>>> gmx md run commands directly through the terminal it works but not
>>> through
>>> the job.sh.
>>> Please suggest me a solution. Sorry for the long text or for addressing
>>> directly to you.
>>>
>>
>> Without specific error messages, I have nothing to go on to suggest a
>> solution. Perhaps you should be consulting your system administrator if the
>> commands are syntactically valid but not operational in the queued
>> environment.
>>
>> -Justin
>>
>> --
>> ==================================================
>>
>> Justin A. Lemkul, Ph.D.
>> Assistant Professor
>> Virginia Tech Department of Biochemistry
>>
>> 303 Engel Hall
>> 340 West Campus Dr.
>> Blacksburg, VA 24061
>>
>> jalemkul at vt.edu | (540) 231-3129
>> http://www.thelemkullab.com
>>
>> ==================================================
>>
>> --
>> Gromacs Users mailing list
>>
>> * Please search the archive at http://www.gromacs.org/Support
>> /Mailing_Lists/GMX-Users_List before posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>> send a mail to gmx-users-request at gromacs.org.
>>
>
>


More information about the gromacs.org_gmx-users mailing list