ANDChemistry/Chemistry Assignments/Computers and their Applications in Chemistry

From WikiEducator
Jump to: navigation, search
Main College Page Main Chemistry Page Chemistry topics Physical Chemistry and Computer Application

Computers and their Applications in Chemistry

For Assignments see questions

For previous years' House Examination question papers seehere

Introduction

Students of physical chemistry come across a large number of experiments that require complicated calculations and plotting of graphs. Many of these problems are specific in nature, which require specific softwares. Knowledge of a programming language can help the student to write the program according to the requirements of the problem.


Icon objectives.jpg
Objectives

After reading this section, you will

  • have basic knowledge about some DOS commands
  • learn about programming in BASIC language




Icon preknowledge.gif

Preknowledge

  • This paper does not require the students to have prior knowledge of computers.
  • The students should have some knowledge of maths.
  • The programs will be based on chemistry topics studied by undergraduate students of chemistry



Icon define.gif
Definitions

FILE is a collection of information. The information can be programs or data. Every DOS file is identified by a unique file name. A file name is made of two parts. The first part is the FILE NAME, which may contain from one to eight characters and numbers but the first character should be a letter. The second part of the name is called an EXTENSION and it can have from one to three characters or numbers. The file name and the extension are separated by a period, for example, myfile.exe.
DIRECTORY is a list of files and other directories. A subdirectory is directory made in the main directory. Each directory is identified by directory name.


FILE PATH is the way in which DOS identifies the file. It includes file name, subdirectory, directory and the drive in which the file is stored in the computer. For example, for a file named maxwell.bas present in chemistry subdirectory in the directory science the file path is represented as C:\science\chemistry\maxwell.bas

DOS Commands

DIR This is the directory command that lists the file names and subdirectories contained in a directory. The listing of files will include the filename and extension for each file, plus the date and time the file was last changed.

DIR/P The DIR command is followed by a slash (/) and the letter P. This causes DOS to stop listing files once it has filled up your screen. The /P stands for pause.
DIR/W will list the files across the width of the screen. The/W stands for wide. It does not include the date and time information for each file.
CLS will clear the screen and a blank screen will appear with the C:\> prompt at top left corner.

DATE displays the current date and asks to change the date if required.
TIME displays the current time and asks to change the time if required.
VER This commands is used to know about the version of operating system.
FORMAT This is used to prepare a disk for use by DOS. Before a new floppy disk can be used, it must be formatted. Once the FORMAT completes, DOS can write new files onto the disk. The format process checks the diskette for damage and builds the root directory among other things. To use format type FORMAT followed by disk drive that has to be formatted. Remember that FORMAT destroys any data, which may already be on a disk; therefore, it should not be unnecessarily used.
MD or MKDIR This command is used to create a new subdirectory in the root directory or any other directory. To give the command type MD followed by space and then the name of the directory, for example,

C:\> MD NEDIR


CD or CHDIR This command is used to change from one directory to the other. The command is given as

C:\> CD NEDIR After giving this command, NEDIR becomes the current directory. All the files will now be stored in NEDIR. The computer screen will show the prompt
C:\NEDIR>

COPY This command is used to make copies of a file. To make a new file the command is

COPY CON MYFILE


MYFILE is the name of the new file created. Now type,

Hello, I am a student of B.Sc. (H).
I am learning Dos
Have a nice day!
Good Bye

Now press Ctrl and Z keys together. This will save the text typed in the file MYFILE.

To make the copy of the file as HELLO, type
COPY MYFILE HELLO

To copy file in a floppy, insert the floppy in drive A and then type
COPY HELLO.TXT A:

To copy the file HELLO from A to C drive as HELLO1 in root directory type
COPY A:\HELLO C:\HELLO1

TYPE This command lists the contents of the file on the screen. It is given as
TYPE MYFILE

ERASE or DEL It erases a file from a directory. It is given as
ERASE HELLO1

RMDIR or RD This will remove an entire directory. RMDIR requires that the directory be empty before it will be removed.
RD NEDIR

To come back to the root directory enter CD..



Road Works.svg Work in progress, expect frequent changes. Help and feedback is welcome. See discussion page. Road Works.svg