mopacREADME.txt


    As those of you who run Mopac know, you can only run one Mopac job
in a directory at a time. So if you wanted to run more that one Mopac job you 
would have to do so in different directories. This turned out to be a big 
problem because the Java RE doesn't provide a way to change directories. So I  
needed to solve this problem within the Java environment while still 
maintaining the portability of the my code. Well, after some thought the 
simplest and most portable solution I came up with was to use system scripts 
to execute Mopac in different directories on the Server. I have
include some sample scripts to show how this is done.

If Mopac is already started by a system script, as is MOPAC7 here the example 
of the modifications that have to be made(3 lines at most).

win32(*.bat):

REM if exist %2\nul cd %2

Unix:

# if [ -n $2 ]
# then 
#     cd $2
# fi
          
If Mopac does not already use a script, then here is the script you need use.

win32(*.bat):

REM Mopac bat file "Whatever.bat"
REM if exist %2\nul cd %2
REM mopac %1

Unix:

# Mopac shell script to execute mopac
# if [ -n $2 ]
# then 
#     cd $2
# fi
# mopac $1


As you can see these scripts simple reads in unique directory name provided by 
the ChemConsoleServer and changes to that directory then excutes Mopac. Please
note that these scripts will also work if used in a Terminal because 
the second variable, $2 or %2, will just be ignored if it is not supplied.     

      










