Previous Thread
Next Thread
Print Thread
Page 1 of 4 1 2 3 4
Joined: Sep 2003
Posts: 4,883
Likes: 12
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,883
Likes: 12
I have posted a handful CHARMM input files, each as a separate thread. This is the README file for the collection.

This is a set of CHARMM sample input files for some basic tasks, put together
from files that have been used for several years in the lab, and some newly
created scripts.

You can get a tar-file containing all these files from
www.biosci.ki.se/md/charmm.html
All individual files have been posted to the Script Archive Forum at
www.charmm.org

The *.inp files are standalone scripts and may need editing to suit your
specific system, although some of them can actually be run directly with the
data files that are also included.
The *.str files should be streamed to from your input file (some of the
sample .inp files do this), and could be used as they are.

Most files require that unix environment variables CHM_HOME (pointing to
the CHARMM installation directory) and CHM_STREAM (pointing to the directory
where these files are located) are defined.

The scripts are only supposed to be a reasonable help to get started using
CHARMM - you have to know your system and make the scientific decisions
about it.

Most of the scripts have been tested for CHARMM typos and technical
correctness and should run with c27 or newer, but please report anomalies,
comments o r suggestions to

Lennart.Nilsson@biosci.ki.se

Stockholm, October 2003 (First edition)

SETUP
add-ions.str
gen-alpha-helix.inp
gen-dna.inp
gen-prot.inp
minimize.inp
rename-2pdb.str
setup-truncated-octahedron.str
solvent-box.str
solvent-shell.str
solvent-sphere.str

DYNAMICS
dynamics.inp
noe-dynamics.inp
run-cpt-md.inp
run-pbc-md.inp
run-sdb-md.inp

ANALYSIS
asa-protein.str
extract-coordinate-frame.inp
hbonds.inp
interaction-energy.inp
merge-orient-trajectory.inp
merge-recenter-trajectory.inp
rmsd-nucleotide.str
rmsd-residue.str
rmsd-rgyr.inp
rmsf-nucleotide.str
rmsf-residue.str
self-diffusion-coeff.inp
trp-anisotropy.inp

There is also a small set of auxiliary (data) files.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Joined: Aug 2004
Posts: 192
E
Edo Offline
Forum Member
Offline
Forum Member
E
Joined: Aug 2004
Posts: 192
Hi Lennart,
I have a question about running your script "gen-prot.inp", which I downloaded from your website.

I define the environment variables as you recommend:
setenv CHM_HOME /v/estor1/home/charmm/c30b2/
setenv CHM_STREAM /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/

and run the script and get the following error:
CHARMM> open unit 21 read form name 4pti-a.pdb
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 21 cannot be opened as 4PTI-A.PDB

***** LEVEL 0 WARNING FROM *****
***** "OPEN" not possible.
******************************************

The 4pti-a.pdb file definatley exists in the working directory:

m1~/Temp/CHARMM_Tutorial/Scripts/>ls 4pti-a.pdb
4pti-a.pdb

It appears that charmm is not looking in my current working directory, because I can fix this error (and get the file to open) by modifying the following line:

open unit 21 read form name 4pti-a.pdb

to

open unit 21 read form name "$CHM_STREAM/H4pti-a.pdb"

CHARMM> open unit 21 read form name "$CHM_STREAM/4pti-a.pdb"
VOPEN> Attempting to open::/v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb::
OPNLGU> Unit 21 opened for READONLY access to /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb

My question is, how do I get CHARMM to automatically look into my current working directory (from which I call charmm and run the scripts) to open files? I would like to avoid having to give the absolute path of the input files each time.

Thanks,
Ed

Joined: Sep 2003
Posts: 4,883
Likes: 12
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,883
Likes: 12
CHARMM does read from the current directory - there is nothing you have to do about it.
The only way I could reproduce your problem was by removing read privilege from the file (chmod -r 4pti-a.pbd).


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Joined: Feb 2004
Posts: 147
Forum Member
Offline
Forum Member
Joined: Feb 2004
Posts: 147
Look at the difference between:
Quote:

CHARMM> open unit 21 read form name 4pti-a.pdb
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 21 cannot be opened as 4PTI-A.PDB



and
Quote:

CHARMM> open unit 21 read form name "$CHM_STREAM/4pti-a.pdb"
VOPEN> Attempting to open::/v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb::
OPNLGU> Unit 21 opened for READONLY access to /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb




In the first case, CHARMM translated the file name to all uppercase; I'm sure that running 'ls 4PTI-A.PDB' would return 'No such file or directory.'. Using the quotes, as in the second case, makes a difference...

Joined: Sep 2003
Posts: 4,883
Likes: 12
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,883
Likes: 12
The double quotes are only necessary if the string is in mixed case.

These are the basic rules that CHARMM uses when opening a file:
1/If the filename is in double quotes, remove the quotes and use the string as is.
2/If there are no quotes, first convert the string to all lower case and try to open the file. If this fails convert the string to all upper case and try again. If this fails, issue error message.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Joined: Aug 2004
Posts: 192
E
Edo Offline
Forum Member
Offline
Forum Member
E
Joined: Aug 2004
Posts: 192
It appears the file is readable/writable

m1~/Temp/CHARMM_Tutorial/Scripts/>ls -ls *pdb
48 -rw------- 1 ed cbs 46656 Oct 23 2003 4pti-a.pdb
8 -rw------- 1 ed cbs 4861 Oct 23 2003 4pti-wat.pdb
20 -rw------- 1 ed cbs 19582 Oct 23 2003 atcg.pdb

so I don't think that is the problem.

I modified the permissions to let all users have read/write access
m1~/Temp/CHARMM_Tutorial/Scripts/>chmod a+rw 4pti-a.pdb
m1~/Temp/CHARMM_Tutorial/Scripts/>ls -ls *pdb
48 -rw-rw-rw- 1 ed cbs 46656 Oct 23 2003 4pti-a.pdb

I then rerun the original script, only to get the same error:
CHARMM> open unit 21 read form name 4pti-a.pdb
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 21 cannot be opened as 4PTI-A.PDB

And Bogdan you are right, the capitalized form of the file does not exist:
m1~/Temp/CHARMM_Tutorial/Scripts/>ls 4PTI-A.PDB
ls: 4PTI-A.PDB: No such file or directory

Any other ideas what might be causing this problem?
Thanks for your help,
Ed

Joined: Sep 2003
Posts: 4,883
Likes: 12
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,883
Likes: 12
Well, I cannot reproduce your problem.
What machine, OS and Fortran compiler are you using?

You can also check what your CHARMM thinks is the working directory, what files are in it, and if you can create a file there with a small CHARMM script:
* testing filenames
*
system "pwd"
system "ls -l"
open unit 21 write form name myfile.txt
stop


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Joined: Oct 2003
Posts: 39
Forum Member
Offline
Forum Member
Joined: Oct 2003
Posts: 39
try this

charmm<1.inp

the 1.inp is the following

* test
*
stream "inputfile"
stop

Joined: Aug 2004
Posts: 192
E
Edo Offline
Forum Member
Offline
Forum Member
E
Joined: Aug 2004
Posts: 192
Hi,
I tried your suggestion, get the same error (see error below). Here are the different tests I've tried, only 'Test 3' works.

* test
*

! Test 0
!stream "4pti-a.pdb"
!stop

! Test 1
!open unit 21 read form name 4pti-a.pdb
!close unit 21

!Test 2
!open unit 21 read form name /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb
!close unit 21

! Test 3
open unit 21 read form name "/v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb"
close unit 21

Here is my computer info:
Linux de6 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux

I am running charmm version c30b2.

Ed

Here was the error message for 'Test 0':
CHARMM> ! Test 0
CHARMM> stream "4pti-a.pdb"
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 99 cannot be opened as 4pti-a.pdb

***** LEVEL 0 WARNING FROM *****
***** "OPEN" not possible.
******************************************
BOMLEV ( 0) IS REACHED - TERMINATING. WRNLEV IS 5

Joined: Aug 2004
Posts: 192
E
Edo Offline
Forum Member
Offline
Forum Member
E
Joined: Aug 2004
Posts: 192
Lennart,
When I include the system calls in the script this is the output (before it dies).

CHARMM> system "pwd"
Invoking: pwd
/v/apps/charmm/c30b2

CHARMM> system "ls -l"
Invoking: ls -l

Regards,
Ed

Page 1 of 4 1 2 3 4

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027)
Responsive Width:

PHP: 7.3.31-1~deb10u5 Page Time: 0.019s Queries: 35 (0.014s) Memory: 0.7882 MB (Peak: 0.8874 MB) Data Comp: Off Server Time: 2023-12-03 00:20:14 UTC
Valid HTML 5 and Valid CSS