source: tests/regression/Potential/FitPartialCharges/pre/measurement_function.py@ da7ef9

Action_Thermostats Add_AtomRandomPerturbation Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChangeBugEmailaddress ChemicalSpaceEvaluator Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_oldresults ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps
Last change on this file since da7ef9 was 16c6f7, checked in by Frederik Heber <heber@…>, 8 years ago

TESTFIX: Recreated fragmentation results and homology containers for all associated fragmentation and potential tests.

  • TESTS: added way how to create .dat files for all fitting regression tests.
  • TESTFIX: Removed again all XFAILs from tests parsing fragmentation results or homologies.
  • TESTFIX: needed to slightly modify fitted potential values and charges.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1import sys
2import pyMoleCuilder as mol
3
4if len(sys.argv) < 13:
5 sys.stderr.write("Usage: "+sys.argv[0]+" <file> <order> <DoLongrange> <DoValenceOnly> <level> <near_field_cells> <server> <port> <basis> <inter-order> <distance> <steps> <bondtable>\n")
6 sys.exit(255)
7
8FILE=sys.argv[1]
9ORDER=sys.argv[2]
10LONGRANGE=sys.argv[3]
11VALENCEONLY=sys.argv[4]
12LEVEL=sys.argv[5]
13NEAR_FIELD_CELLS=sys.argv[6]
14SERVERADDRESS=sys.argv[7]
15CONTROLLERPORT=sys.argv[8]
16BASISNAME=sys.argv[9]
17INTERORDER=sys.argv[10]
18DISTANCE=sys.argv[11]
19STEPS=int(sys.argv[12])
20BONDTABLE=sys.argv[13]
21
22# load bond table file
23mol.CommandBondLengthTable(BONDTABLE)
24# Load molecule
25mol.MoleculeLoad(FILE)
26# Set parser parameter for mpqc
27mol.ParserSetParserParameters("mpqc", "theory=CLHF;basis="+BASISNAME+";")
28# set boundary
29mol.WorldSetBoundaryConditions("Ignore Ignore Ignore")
30# update molecule graph as first step setting does not change anything
31mol.GraphUpdateMolecules()
32# set box
33mol.WorldChangeBox("8,0,0,8,0,8")
34
35for i in range(0,STEPS):
36 # set current time
37 mol.WorldSetWorldTime(str(i))
38 # fragment system
39 mol.SelectionAllAtoms()
40 mol.FragmentationFragmentation("", DISTANCE, ORDER, "1", "1", "", "0.", LEVEL, INTERORDER, "0", "0")
41 mol.FragmentationFragmentationAutomation(SERVERADDRESS, CONTROLLERPORT, "mpqc", "0.", LEVEL, NEAR_FIELD_CELLS, "3", LONGRANGE, "", VALENCEONLY, "0")
42 mol.FragmentationAnalyseFragmentationResults("1", "", "0")
43
44# save homologies
45mol.PotentialSaveHomologies("homology.dat")
46mol.PotentialSaveAtomFragments("atomfragments.dat")
47
48# exit
49sys.exit(0)
Note: See TracBrowser for help on using the repository browser.