Quantum chemistry
Matlab M C Python
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead, 10 commits behind djyaron:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
@AggregateFragment
@CSet
@Context
@Datagen
@Environment
@FitBasis
@Fitme
@Fitme2
@Fragment
@MBandit
@MFactory
@MSet
@Mixer
@MixerC
@Model1
@Model2
@Model3
@OptMonitor
data
data2
data3
ethylene1mp2
templates
.gitignore
Aggregator.m
GATalk.m
HFsolve.m
LMFnlsq.m
LMFnlsqtest.m
MfactoryVerify.m
README.md
aggregate1.m
aggregation.m
aldehyde1.m
bandit1.m
banditInterface.m
basisPlots.m
ch4-data.m
ch4r-data.m
chargeUpdate.m
checkForInput.m
cleanup.m
comp_struct.m
context1.m
context1r.m
context2.m
context2psc.m
contextFactory.m
contextFactory2.m
contextFactory3.m
contextFit.m
contextFit2.m
contextFit3.m
contextFit4.m
contextPCA.m
contextRapid.m
demo2.m
demo3.m
demo4.m
dofit.m
elementWiseCombine.c
elementWiseCombine.m
ethane-anal.m
ethane-anal2-field.m
ethane-anal2.m
ethane-anal3.m
ethane-anal4.m
ethane.m
ethaneField.m
ethaner-data.m
ethylene-data.m
ethylenedata.m
ethylenerdata.m
evalModelsParallel.c
experiment_comp.m
experiment_gen.m
experiment_run.m
explore1.m
factoryUse.m
field-data.m
findText.m
fit1.m
globalopt.m
h2-anal.m
h2-data.m
h2-fields.m
hartfock.m
hfspeed.m
hybridanal.m
loss.m
m2verify.m
makeFitme.m
mergeDatasets.m
mexCompile.m
mixed-data.m
mm.c
mm.m
model3test.m
multi1.m
multi2.m
multi3.m
multi3b.m
multi4.m
multi5.m
multi6.m
multi6anal.m
multihybrid1.m
newEnvs.m
optimplay.m
overview.docx
parallelTime.m
parallelTime2.m
pca1.m
pca1_old.m
pca2.m
profiler.m
propane-data.m
propane-fit.m
propene-data.m
psc.m
res.m
rr1.m
runModelsParallel.m
shiva.m
skipline.m
stopping.m
submitPSC.m
testloss.m
tmpfrag.m
twoElecFock.c
twoElecFock.m
validateInput.m
verify1.m
verifyMatrixContents.m
verifyMbandit.m
verifyzip.m
vote1.m
walkthrough1.docx

README.md

MSQC (Molecular Similarity in Quantum Chemistry)

TODO: Add big picture documentation.

Compilation of MEX C Code

There are a few MEX routines written in C that must be compiled before use. An attempt will be made to do the compilation automatically if the binaries do not exist. Alternatively, all of the code can be compiled by simply calling mexCompile. If you've never used mex before, you'll need to choose a compiler on the first run. If none are available, see http://www.mathworks.com/support/compilers/R2012b/win64.html. For 64 bit Windows and MATLAB R2012b, you probably want http://www.microsoft.com/en-us/download/details.aspx?id=8279.

Basic Flow of a Train and Test Run

  1. Make a set of models, by taking the frag's for the molecules you care about, and making Model3 classes out of them. At this point, those models are unmodifed (no parameters, so calling them will just do the bare LL method). Make one set for the train, and then as many test sets as you like.
  2. Create an MFactory, by establishing policies that say how mixers are created.
  3. Create a Fitme object for the train MSet
  4. Use some routine to optimize the parameters using that Fitme.
  5. Now the MFactory has the mixers, with optimized parameters, and the policies about how to apply these mixers.
  6. Create a Fitme object for each test data set, and when you call .err on this fitme, it will magically work. You have to be careful that the ordering of parameters in this fitme object will not be the same as other fitme's created by the same MFactory.

Demo Code

%% Demonstration on 6/19/13, using MFactory, MixerC etc.
clear classes;
fileName = 'D:\dave\apoly\msqc\datasets\ch4rDat.mat';
ms = MSet;
ms.addData(fileName,1:2,1:2,1,101);
mtest = MSet;
mtest.addData(fileName,3:4,1:2,1,101);
mf = MFactory;
mf.setPolicies('hybridslater1');
mf.makeMixInfo([1 6]);
ftrain = mf.makeFitme(ms);
ftest = mf.makeFitme(mtest);

%%
maxIter = 100;
epsTest = 1.0e-5
updateContext = 0;
[err,pt, testErr, monitor] = contextFit4(ftrain,ftest,...
  maxIter,epsTest,updateContext);