This file contains a list of the scripts in this folder and explanation as to their use.  Recommendations as to how the use these scripts to generate a small molecule protein input pdb for input into ligand mode of rosetta follow.   
First, create a file with only the HETATM or ATOM statements of the small moelcule or ligand that you want. For the example in the example_files folder we can grep the LOV residue HETATM statement using the follwoing line. 
grep LOV 2ER7.pdb | grep HETATM > 2ER7_hetatm_start.pdb
With the pdb file we can now use the pdb2mdl.inp script to call molecule.exe to produce a an mdlfile. 
pdb2mdl.inp 2ER7_hetatm_start.pdb > 2ER7_hetatm.mdl
The mdlfile allows us check that molecule.exe recognizes the bonding network of the molecule correctly. The fourth line of the file has two numbers of imporatnace in the first columns. The first number is the number of atoms and the second is the number of bonds. If you manually edit this file andremove or add a line these need to be updated. The next lines are the atoms in the molecule. With cartesian coordinates followed by the atomname. The Bond block follows the Atom block. The first two numbers are the line numbers in the atom block that the bond connects.  The third number is the bond type: 1=single bond, 2=double bond, 3=triple bond, 4=aromatic/conjugated bond. Looking at the example mdlfile we see that there is a bond type 4 present between to carbons that should infact be a single bond. Change the 4 to a 1. Now run the addhydrogens.inp script to add hydrogens to the molecule.
addhydrogens.inp 2ER7_hetatm.mdl
The resulting 2ER7_hetatm.mdl file will look like 2ER7_hetatm_w_hydrogens.mdl
This mdlfile has all the atoms and bond description needed to allow molecule.exe to determine the appropriate rosetta atom types. Now run the mdl2rosetta.inp script to generate the HETATM statements that can be usedin the input file to rosetta. 
 mdl2rosetta.inp 2ER7_hetatm_w_hydrogens.mdl | grep HETATM > 2er7_hetam_rosetta.pdb

This final file should be added to the end of the input pdb file seperated by a TER statement form teh PDB ATOM records. If the molecule is charged add a a CHARGE record after the HETATM statement. 

all example fiels are found in the example_files directory. 

molecule.exe is a c++ program executable written by Jens Meiler. The operation of the subsequently describe rely on this program. The executable in this directory runs on an x86_64 Linux box 

pdb2mdl.inp is a script to translate a pdb format file into a mdl format file which is output to stdout
#Usage
pdb2rosetta.inp pdbfile
#outptut is directed to the screen

mdl2rosetta.inp translates an mdl format file into a pdb format file with rosetta atomtype names. 
#Usage
mdl2rosetta.inp mdlfile
#output

addhydrogens.inp will add hydrogens to fill  missing valences.
#Usage
addhydrogens.inp
#output is directed to screen 
