WebMO - Computational chemistry on the WWW
Recent news

WebMO 6.1 is now available for free download!

WebMO 6.1 Pro has a variety of additional features and is available for purchase.

WebMO supports Windows, Mac, and Unix web browsers.

August 17, 2019

Problem Importing a Filename with Hyp... Log Out | Topics | Search
Moderators | Edit Profile

WebMO Support Forum » Bug Reports » WebMO Version 3.X » Problem Importing a Filename with Hyphens « Previous Next »

Author Message
Nancy
Posted on Tuesday, May 07, 2002 - 1:04 am:   

WebMO does not import an existing output file whose name contains a hyphen.

Here are the details: From the Job Manager page, I click Import Job. After entering a Job Name and specifying the Job Type, I enter a Remote Output File name like
     /home/nancy/g98/butadiene/C4H6-631G.log
and WebMO responds with
     Invalid characters specified in path

If I rename the file so that it does not contain any hyphens, then the import proceeds properly.

How can I get WebMO to import files whose names contain hyphens?
William Polik (Polik)
Posted on Tuesday, May 07, 2002 - 5:55 pm:   

It seems that we do some slightly excessive in checking for illegal characters in filenames. This will be fixed in version 3.3 of WebMO. In the meantime, the following patch can be applied to files in your WebMO cgi directory.

In gaussian.cgi, locate the sub import_gaussian_job subroutine. In the first if statement, change the expression
     /[^\w.\/]/
to
     /[^\w.\/-]/
which adds the hyphen character to the list of allowable characters for the filename.

Repeat for gamess.cgi, in the import_gamess_job subroutine.
Repeat for mopac.cgi, in the import_mopac_job subroutine.

It is always good practice to backup files before you edit them, i.e.,
     $ cp -p gamess.cgi gamess.cgi.orig
Also, note that the difference in filelength between the original file and the modifed file should be only one character when doing a directory listing.
William Polik (Polik)
Posted on Tuesday, May 07, 2002 - 6:43 pm:   

The above changes have been collected into a patch file, which is available for download here:
mac/unknownhyphen_3.2.002p.patch
hyphen_3.2.002p.patch (<1 k)
Right-click on the above link and save it as a file named "hyphen_3.2.002p.patch".

To use the patch file, locate the the webmo cgi script directory, move into the webmo cgi script directory, backup the files to be patched, copy the patch into the current directory, and apply the patch:

find ~ -name "run_gamess.cgi"
cd {path to WebMO cgi directory}
cp -p gamess.cgi gamess.cgi.orig
cp -p gaussian.cgi gaussian.cgi.orig
cp -p mopac.cgi mopac.cgi.orig
cp {path to patch}/hyphen_3.2.002p.patch .
patch <hyphen_3.2.002p.patch


This patch should be applied only to WebMO version 3.2, though it will likely work on earlier versions. Although the patch was generated for WebMO Pro, it should work for both WebMO (the free version) and WebMO Pro. Because the patch process analyzes the context of the lines to be changed, it will work even if you have made minor customizations to the above files.

Add Your Message Here
Post:
Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration