Changeset a8aadf6 for src


Ignore:
Timestamp:
Sep 5, 2008, 5:09:39 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
d1fc7f
Parents:
ed060e
Message:

SaveConfig() now also stores an MPQC input file.

MoleculeListClass::OutputConfigForListOfFragments() did this already, but it was missing for SaveConfig(). We do the same regarding filenames and output, only we call config::SaveMPQC().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    red060e ra8aadf6  
    686686      output.open(DEFAULTCONFIG, ios::trunc);
    687687    }
     688  cout << Verbose(0) << "Saving of config file ";
    688689  if (configuration->Save(&output, periode, mol))
    689     cout << Verbose(0) << "Saving of config file successful." << endl;
     690    cout << "successful." << endl;
    690691  else
    691     cout << Verbose(0) << "Saving of config file failed." << endl;
     692    cout << "failed." << endl;
    692693  output.close();
    693694  output.clear();
     695 
    694696  // and save to xyz file
    695697  if (ConfigFileName != NULL) {
     
    703705    output.open(filename, ios::trunc);
    704706  }
     707  cout << Verbose(0) << "Saving of XYZ file ";
    705708  if (mol->MDSteps <= 1) {
    706709    if (mol->OutputXYZ(&output))
    707       cout << Verbose(0) << "Saving of XYZ file successful." << endl;
     710      cout << "successful." << endl;
    708711    else
    709       cout << Verbose(0) << "Saving of XYZ file failed." << endl;
     712      cout << "failed." << endl;
    710713  } else {
    711714    if (mol->OutputTrajectoriesXYZ(&output))
    712       cout << Verbose(0) << "Saving of XYZ file successful." << endl;
     715      cout << "successful." << endl;
    713716    else
    714       cout << Verbose(0) << "Saving of XYZ file failed." << endl;
     717      cout << "failed." << endl;
    715718  }
     719  output.close();
     720  output.clear();
     721 
     722  // and save as MPQC configuration
     723  if (ConfigFileName != NULL) {
     724    strcpy(filename, ConfigFileName);
     725    strcat(filename, ".in");
     726    output.open(filename, ios::trunc);
     727  }
     728  if (output == NULL) {
     729    strcpy(filename,"main_pcp_linux");
     730    strcat(filename, ".in");
     731    output.open(filename, ios::trunc);
     732  }
     733  cout << Verbose(0) << "Saving as mpqc input ";
     734  if (configuration->SaveMPQC(&output, mol))
     735    cout << "done." << endl;
     736  else
     737    cout << "failed." << endl;
    716738  output.close();
    717739  output.clear();
Note: See TracChangeset for help on using the changeset viewer.