-
Notifications
You must be signed in to change notification settings - Fork 2
old_ _Tutorials_and_problems
Notes from Sam 20101012:
I've just got lensfield running on a clean linux box (one that hasn't ever seen lensfield2 before) using the following sequence of commands:
It sounds like LF_HOME may not be set correctly; you shouldn't need to set it at all, but if you do decide to then it needs to point to the directory created when you unzip lensfield2-0.1.1.zip.
If I were to set LF_HOME, I would do:
See also http://quixote.wikispot.org/Tutorials_and_problems#PabloMac if you use a Mac.
Through Lensfield2 implementation for JUMBO http://bitbucket.org/petermr/lensfieldjumbo, we'll start with a Gaussian archive example:
In this case, we have
Lensfield2 can convert these to
by using a converter from *.gau to *.cml
* First you need to be sure that the basic components in [[http://quixote.wikispot.org/Tutorials_and_problems#First]] are properly installed on your system, and also you need to have [[JUMBO-Converters]] installed (see [[http://quixote.wikispot.org/Tutorials_and_problems#JUMBO1]] for instructions on how to do so. * Then you install Lensfield-JUMBO as described above * Go to the example directory:
* The build file {{{gaussianArchive2Cml.lf}}} contains
Notes:
* The {{{source}}} directive identifies ("globs") all files in and below the current directory of the form {{{*.gau}}}. This can go as deep as you like - you could, in principle, traverse your whole machine. * The {{{build}}} directive creates a corresponding set of globbed output files. (There are clever things that can be done with globbing, but for now we note that it creates a sibling *.cml file for each *.gau.) * The {{{ org.xmlcml.cml.converters.compchem.gaussian.GaussianArchive2CMLConverter/convert}}} indicates the class/method to use. Because we have created a standard interface {{{convert}}} for all converters you don't need to worry about what is happening. [If you are worried, convert takes an InStream and converts it to an OutStream and there is still a bit of magic involved.] * {{{input}}} indicates to use the files glob as input * {{{output}}} indicates to gllob the output as *.cml * The build step depends on the jumbo-converters-compchem maven project. If any code in this is changed, this step (and all downstream steps) will be re-run. Note also that if any *.gau are changed or their generation process is changed (e.g. a new version of the code) then this step will also be triggered.
* Run lensfield with the command:
which should give an output something like:
Notice the debug info - which is well worth it at this stage.
* Rerun the command
You should now get:
Nothing happened! Which is what we expected since all dependencies are up-to-date.
* Now try cleaning the directory:
which gives
This cleans ALL the files you have created.
* Now run the build again:
* There is a similar file in {{{examples/gamessuk}}}. See if it works for you...
Sam:
The most recent lensfield code on bitbucket is in the midst of some major refactoring, and is currently unstable. If you wish to compile lensfield yourself then you should use the tagged version:
To create the distributed zip, you then do something like (I can't remember exactly off the top of my head):
And a .zip and .tar.gz will be generated in the target/ directory.
This uses Pablo's data on conformations of an amino acid carried out at different levels of theory.
Pablo's data are at Pablo_Echenique's_dataset. There are about 80,000 calculations and we'll just select one:
This directory contains about 400 files:
Index of /files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G:
We are going to download all of these. Note that we don't know what these files are:
The files look like
I am assuming this is the input for the calculation. Note that "*.com" is interpreted as a system-specific file on Windows. We shall run up against these generic suffixes and will need to find out by reading the files.
The *.gaudir look like:
This is a format by Pablo used by some inhouse scripts, nothing needs to be done with it.
This is the standard Gaussian output file. We shall convert part of it to CML.
* You need to have installed everything in: 1. [[http://quixote.wikispot.org/Tutorials_and_problems#First|First of all]] 1. [[http://quixote.wikispot.org/Tutorials_and_problems#JUMBO1|JUMBO-Converters tutorial 1]] 1. [[http://quixote.wikispot.org/Tutorials_and_problems#Lensfield1|Lensfield-JUMBO tutorial 1]]
//Note (Jorge): I did the in my Linux machine. If I didn't, I would get the following error when executing the download command in a later step//
//Note (Jorge): This is the command, in my Linux machine, that makes the rest of the tutorial to run smoothly// Using the same shell environment as the one used when installing Lensfield (JAVA_HOME, PATH with Lensfield on it), run:
//Note (Marcus): You will need to set JAVA_HOME on the Mac - export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home//
Then, go to the directory (you can skip the following creation step, since this directory already exists). Then go on with the next steps.
//Note (Jorge): The rest of the tutorial goes on as before.//
Let's make an output directory:
as this will allow us to create a complete subtree if required
Then issue the command (I have formatted the args and you amy have to reconcatenate them)
And you should get: [exec:java] [INFO] ------------------------------------------------------------------------ [INFO] Preparing exec:java [INFO] No goals needed for project - skipping [INFO] [exec:java] args: 5 0 [org.xmlcml.cml.rest.Client.main()] INFO org.xmlcml.cml.rest.Client - downloading url http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G/ to directory . >> http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G/ org.restlet.engine.http.connector.HttpClientHelper start INFO: Starting the default HTTP client http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//MP2_6-31G.gaudir http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//f-15_p-15.com http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//f-15_p-15.log http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//f-15_p-45.com ... and many more lines... then ...
>> http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//MP2_6-31G.gaudir 16-Oct-2010 14:34:25 org.restlet.engine.http.connector.HttpClientHelper start INFO: Starting the default HTTP client >> http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//f-15_p-15.com 16-Oct-2010 14:34:26 org.restlet.engine.http.connector.HttpClientHelper start INFO: Starting the default HTTP client >> http://neptuno.unizar.es/files/public/datasets/HCO-L-Ala-NH2_g03_BIFIcluster_2007/calcs/homolevel/MP2/6-31G//f-15_p-15.log 16-Oct-2010 14:34:26 org.restlet.engine.http.connector.HttpClientHelper start INFO: Starting the default HTTP client 16-Oct-2010 14:34:27 org.restlet.engine.http.connector.HttpClientHelper stop ... and finishing...
There should then be about 290 files
Now we convert the files in to CML. Rather than create new files in this directory we'll create a new directory for each file (partly to show you how and partly because I think it's useful to have one directory per compound). We use the Lensfield file gaussianArchive2Cml.lf . It will be useful if you take time to understand it. Comments start with ";"
The output looks like:
now check the results:
The elements wrap the chunks and preserve all whitespace except trailing. You'll see we are already using CML and in the code this is mapped to elements.