Changeset 88afc9


Ignore:
Timestamp:
Feb 13, 2015, 9:18:04 AM (11 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, Candidate_v1.7.0, 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:
b9b49e
Parents:
2fcef3
git-author:
Frederik Heber <heber@…> (01/29/15 00:25:11)
git-committer:
Frederik Heber <heber@…> (02/13/15 09:18:04)
Message:

Enhanced add-bonds and remove-bonds to multiply selected pairs of atoms.

  • renamed add/remove-bond -> add/remove-bond(s) to emphasize this.
  • added regression test on three selected atoms.
  • modified userguide entry for both actions.
Files:
8 added
9 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r2fcef3 r88afc9  
    11501150        </section>
    11511151
    1152         <section xml:id='bond.add-bond'>
    1153           <title xml:id='bond.add-bond.title'>Adding a bond manually</title>
     1152        <section xml:id='bond.adds-bond'>
     1153          <title xml:id='bond.adds-bond.title'>Adding a bond manually</title>
    11541154
    11551155          <para>When the automatically created adjacency or bond graph
    11561156          contains faulty bonds or lacks some, you can add them manually.
    1157           First, you must have selected two atoms.</para>
    1158 
    1159           <programlisting>... --add-bond</programlisting>
    1160         </section>
    1161 
    1162         <section xml:id='bond.remove-bond'>
    1163           <title xml:id='bond.remove-bond.title'>Removing a bond manually
     1157          </para>
     1158
     1159          <programlisting>... --add-bonds</programlisting>
     1160
     1161          <para>If two atoms are selected, the single bond in between, if not
     1162          present, is added. If more than two atoms are selected, than the
     1163          bond between any pair of these is added.</para>
     1164         <note><para>This is especially useful in conjunction with the
     1165          fragmentation scheme. If you want to know the contribution from
     1166          certain fragments whose subgraph is not connected you can simply
     1167          make the associated subset of atoms connected by selecting all
     1168          bonds and adding the bonds.</para>
     1169         </note>
     1170        </section>
     1171
     1172        <section xml:id='bond.remove-bonds'>
     1173          <title xml:id='bond.remove-bonds.title'>Removing a bond manually
    11641174          </title>
    11651175
     
    11671177          bond.</para>
    11681178
    1169           <programlisting>... --remove-bond</programlisting>
     1179          <programlisting>... --remove-bonds</programlisting>
     1180
     1181          <para>Similarly, if more than two atoms are selected, then all bonds
     1182          found between any pair of these is removed.</para>
    11701183        </section>
    11711184
  • src/Actions/BondAction/BondAddAction.cpp

    r2fcef3 r88afc9  
    5757ActionState::ptr BondAddAction::performCall() {
    5858  // check preconditions
    59   if (World::getInstance().countSelectedAtoms() != 2) {
    60     STATUS("Exactly two atoms must be selected for BondAction Add.");
     59  World& world = World::getInstance();
     60  if (world.countSelectedAtoms() <= 1) {
     61    STATUS("There must be at least two atoms selected for BondAction Add.");
    6162    return Action::failure;
    6263  }
    63   const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms();
    64   if (selected_atoms[0]->IsBondedTo(WorldTime::getTime(), selected_atoms[1])) {
    65     STATUS("There already is a bond in between the two selected atoms.");
     64
     65  bondPairIds_t bondPairIds;
     66  for (World::AtomSelectionConstIterator firstiter = world.beginAtomSelection();
     67      firstiter != world.endAtomSelection(); ++firstiter) {
     68    for (World::AtomSelectionConstIterator seconditer = firstiter;
     69        seconditer != world.endAtomSelection(); ++seconditer) {
     70      if (firstiter == seconditer)
     71        continue;
     72      if (!(firstiter->second)->IsBondedTo(WorldTime::getTime(), seconditer->second))
     73        bondPairIds.push_back(
     74            std::make_pair((firstiter->second)->getId(), (seconditer->second)->getId()));
     75    }
     76  }
     77  if (bondPairIds.empty()) {
     78    STATUS("All bonds are already present.");
    6679    return Action::failure;
    6780  }
    6881
    6982  // create undo
    70   BondAddState *UndoState = new BondAddState(selected_atoms[0]->getId(), selected_atoms[1]->getId(), params);
     83  BondAddState *UndoState = new BondAddState(bondPairIds, params);
    7184
    7285  // execute action
    73   selected_atoms[0]->addBond(WorldTime::getTime(), selected_atoms[1]);
    74   ASSERT( selected_atoms[0]->IsBondedTo(WorldTime::getTime(), selected_atoms[1]),
     86  for (bondPairIds_t::const_iterator iter = bondPairIds.begin();
     87      iter != bondPairIds.end(); ++iter) {
     88    atom *firstatom = world.getAtom(AtomById(iter->first));
     89    atom *secondatom = world.getAtom(AtomById(iter->second));
     90    ASSERT((firstatom != NULL) && (secondatom != NULL),
     91        "BondAddAction::performCall() - at least one of the ids "
     92        +toString(iter->first)+" or "+toString(iter->second)+" is not present.");
     93    firstatom->addBond(WorldTime::getTime(), secondatom);
     94    ASSERT( firstatom->IsBondedTo(WorldTime::getTime(), secondatom),
    7595      "BondAddAction::performCall() - adding bond in between "
    76       +toString(*selected_atoms[0])+" and "+toString(*selected_atoms[1])+" failed.");
     96      +toString(*firstatom)+" and "+toString(*secondatom)+" failed.");
     97  }
    7798
    7899  return ActionState::ptr(UndoState);
     
    83104
    84105  // check whether bond already existed
    85   atom * const first = World::getInstance().getAtom(AtomById(state->firstId));
    86   atom * const second = World::getInstance().getAtom(AtomById(state->secondId));
    87   ASSERT((first != NULL) && (second != NULL),
    88       "BondAddAction::performUndo() - at least one of the ids "
    89       +toString(state->firstId)+" or "+toString(state->secondId)+" is not present.");
    90   if (first->IsBondedTo(WorldTime::getTime(), second)) {
    91     first->removeBond(WorldTime::getTime(), second);
    92   } else {
    93     ELOG(2, "There is no bond in between "+toString(state->firstId)
    94         +" and "+toString(state->secondId)+".");
     106  World& world = World::getInstance();
     107  for (bondPairIds_t::const_iterator iter = state->bondPairIds.begin();
     108      iter != state->bondPairIds.end(); ++iter) {
     109    atom *firstatom = world.getAtom(AtomById(iter->first));
     110    atom *secondatom = world.getAtom(AtomById(iter->second));
     111    ASSERT((firstatom != NULL) && (secondatom != NULL),
     112        "BondAddAction::performCall() - at least one of the ids "
     113        +toString(iter->first)+" or "+toString(iter->second)+" is not present.");
     114    if (firstatom->IsBondedTo(WorldTime::getTime(), secondatom)) {
     115      firstatom->removeBond(WorldTime::getTime(), secondatom);
     116    } else {
     117      ELOG(2, "There is no bond in between "+toString(iter->first)
     118          +" and "+toString(iter->second)+".");
     119    }
    95120  }
    96121
     
    102127
    103128  // check whether bond already existed
    104   atom * const first = World::getInstance().getAtom(AtomById(state->firstId));
    105   atom * const second = World::getInstance().getAtom(AtomById(state->secondId));
    106   ASSERT((first != NULL) && (second != NULL),
    107       "BondAddAction::performRedo() - at least one of the ids "
    108       +toString(state->firstId)+" or "+toString(state->secondId)+" is not present.");
    109   if (!first->IsBondedTo(WorldTime::getTime(), second)) {
    110     first->addBond(WorldTime::getTime(), second);
    111   } else {
    112     ELOG(2, "There is already a bond in between "+toString(state->firstId)
    113         +" and "+toString(state->secondId)+".");
     129  World& world = World::getInstance();
     130  for (bondPairIds_t::const_iterator iter = state->bondPairIds.begin();
     131      iter != state->bondPairIds.end(); ++iter) {
     132    atom * const firstatom = world.getAtom(AtomById(iter->first));
     133    atom * const secondatom = world.getAtom(AtomById(iter->second));
     134    ASSERT((firstatom != NULL) && (secondatom != NULL),
     135        "BondAddAction::performCall() - at least one of the ids "
     136        +toString(iter->first)+" or "+toString(iter->second)+" is not present.");
     137    if (!firstatom->IsBondedTo(WorldTime::getTime(), secondatom)) {
     138      firstatom->addBond(WorldTime::getTime(), secondatom);
     139    } else {
     140      ELOG(2, "There is already a bond in between "+toString(iter->first)
     141          +" and "+toString(iter->second)+".");
     142    }
    114143  }
    115144
  • src/Actions/BondAction/BondAddAction.def

    r2fcef3 r88afc9  
    88// all includes and forward declarations necessary for non-integral types below
    99#include "types.hpp"
     10#include <vector>
     11#include <utility>
     12
     13typedef std::vector<std::pair<atomId_t,atomId_t> > bondPairIds_t;
    1014
    1115// i.e. there is an integer with variable name Z that can be found in
     
    2024#undef paramvalids
    2125
    22 #define statetypes (atomId_t)(atomId_t)
    23 #define statereferences (firstId)(secondId)
     26#define statetypes (bondPairIds_t)
     27#define statereferences (bondPairIds)
    2428
    2529// some defines for all the names, you may use ACTION, STATE and PARAMS
     
    2832#define MENUPOSITION 1
    2933#define ACTIONNAME Add
    30 #define TOKEN "add-bond"
     34#define TOKEN "add-bonds"
    3135
    3236// finally the information stored in the ActionTrait specialization
    33 #define DESCRIPTION "add bond in between two selected atoms"
     37#define DESCRIPTION "add bonds in between any number of selected atoms"
    3438#undef SHORTFORM
  • src/Actions/BondAction/BondRemoveAction.cpp

    r2fcef3 r88afc9  
    5757ActionState::ptr BondRemoveAction::performCall() {
    5858  // check preconditions
    59   if (World::getInstance().countSelectedAtoms() != 2) {
    60     STATUS("Exactly two atoms must be selected for BondAction Remove.");
     59  World& world = World::getInstance();
     60  if (world.countSelectedAtoms() <= 1) {
     61    STATUS("At least two atoms must be selected for BondAction Remove.");
    6162    return Action::failure;
    6263  }
    63   const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms();
    64   if (!selected_atoms[0]->IsBondedTo(WorldTime::getTime(), selected_atoms[1])) {
    65     STATUS("There is no bond in between the two selected atoms.");
     64
     65  bondPairIds_t bondPairIds;
     66  for (World::AtomSelectionConstIterator firstiter = world.beginAtomSelection();
     67      firstiter != world.endAtomSelection(); ++firstiter) {
     68    for (World::AtomSelectionConstIterator seconditer = firstiter;
     69        seconditer != world.endAtomSelection(); ++seconditer) {
     70      if (firstiter == seconditer)
     71        continue;
     72      if ((firstiter->second)->IsBondedTo(WorldTime::getTime(), seconditer->second))
     73        bondPairIds.push_back(
     74            std::make_pair((firstiter->second)->getId(), (seconditer->second)->getId()));
     75    }
     76  }
     77  if (bondPairIds.empty()) {
     78    STATUS("No bonds are present.");
    6679    return Action::failure;
    6780  }
    6881
    6982  // create undo
    70   BondRemoveState *UndoState = new BondRemoveState(selected_atoms[0]->getId(), selected_atoms[1]->getId(), params);
     83  BondRemoveState *UndoState = new BondRemoveState(bondPairIds, params);
    7184
    7285  // execute action
    73   selected_atoms[0]->removeBond(WorldTime::getTime(), selected_atoms[1]);
    74   ASSERT( !selected_atoms[0]->IsBondedTo(WorldTime::getTime(), selected_atoms[1]),
    75       "BondRemoveAction::performCall() - removing bond in between "
    76       +toString(*selected_atoms[0])+" and "+toString(*selected_atoms[1])+" failed.");
     86  for (bondPairIds_t::const_iterator iter = bondPairIds.begin();
     87      iter != bondPairIds.end(); ++iter) {
     88    atom *firstatom = world.getAtom(AtomById(iter->first));
     89    atom *secondatom = world.getAtom(AtomById(iter->second));
     90    ASSERT((firstatom != NULL) && (secondatom != NULL),
     91        "BondAddAction::performCall() - at least one of the ids "
     92        +toString(iter->first)+" or "+toString(iter->second)+" is not present.");
     93    firstatom->removeBond(WorldTime::getTime(), secondatom);
     94    ASSERT( !firstatom->IsBondedTo(WorldTime::getTime(), secondatom),
     95      "BondAddAction::performCall() - adding bond in between "
     96      +toString(*firstatom)+" and "+toString(*secondatom)+" failed.");
     97  }
    7798
    7899  return ActionState::ptr(UndoState);
     
    82103  BondRemoveState *state = assert_cast<BondRemoveState*>(_state.get());
    83104
    84   // check whether bond already existed
    85   atom * const first = World::getInstance().getAtom(AtomById(state->firstId));
    86   atom * const second = World::getInstance().getAtom(AtomById(state->secondId));
    87   ASSERT((first != NULL) && (second != NULL),
    88       "BondRemoveAction::performUndo() - at least one of the ids "
    89       +toString(state->firstId)+" or "+toString(state->secondId)+" is not present.");
    90   if (!first->IsBondedTo(WorldTime::getTime(), second)) {
    91     first->addBond(WorldTime::getTime(), second);
    92   } else {
    93     ELOG(2, "There is already a bond in between "+toString(state->firstId)
    94         +" and "+toString(state->secondId)+".");
     105  World& world = World::getInstance();
     106  for (bondPairIds_t::const_iterator iter = state->bondPairIds.begin();
     107      iter != state->bondPairIds.end(); ++iter) {
     108    atom * const firstatom = world.getAtom(AtomById(iter->first));
     109    atom * const secondatom = world.getAtom(AtomById(iter->second));
     110    ASSERT((firstatom != NULL) && (secondatom != NULL),
     111        "BondAddAction::performCall() - at least one of the ids "
     112        +toString(iter->first)+" or "+toString(iter->second)+" is not present.");
     113    if (!firstatom->IsBondedTo(WorldTime::getTime(), secondatom)) {
     114      firstatom->addBond(WorldTime::getTime(), secondatom);
     115    } else {
     116      ELOG(2, "There is already a bond in between "+toString(iter->first)
     117          +" and "+toString(iter->second)+".");
     118    }
    95119  }
    96120
     
    101125  BondRemoveState *state = assert_cast<BondRemoveState*>(_state.get());
    102126
    103   // check whether bond already existed
    104   atom * const first = World::getInstance().getAtom(AtomById(state->firstId));
    105   atom * const second = World::getInstance().getAtom(AtomById(state->secondId));
    106   ASSERT((first != NULL) && (second != NULL),
    107       "BondRemoveAction::performRedo() - at least one of the ids "
    108       +toString(state->firstId)+" or "+toString(state->secondId)+" is not present.");
    109   if (first->IsBondedTo(WorldTime::getTime(), second)) {
    110     first->removeBond(WorldTime::getTime(), second);
    111   } else {
    112     ELOG(2, "There is no bond in between "+toString(state->firstId)
    113         +" and "+toString(state->secondId)+".");
     127  World& world = World::getInstance();
     128  for (bondPairIds_t::const_iterator iter = state->bondPairIds.begin();
     129      iter != state->bondPairIds.end(); ++iter) {
     130    atom *firstatom = world.getAtom(AtomById(iter->first));
     131    atom *secondatom = world.getAtom(AtomById(iter->second));
     132    ASSERT((firstatom != NULL) && (secondatom != NULL),
     133        "BondAddAction::performCall() - at least one of the ids "
     134        +toString(iter->first)+" or "+toString(iter->second)+" is not present.");
     135    if (firstatom->IsBondedTo(WorldTime::getTime(), secondatom)) {
     136      firstatom->removeBond(WorldTime::getTime(), secondatom);
     137    } else {
     138      ELOG(2, "There is no bond in between "+toString(iter->first)
     139          +" and "+toString(iter->second)+".");
     140    }
    114141  }
    115142
  • src/Actions/BondAction/BondRemoveAction.def

    r2fcef3 r88afc9  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include "types.hpp"
     10#include <vector>
     11#include <utility>
     12
     13typedef std::vector<std::pair<atomId_t,atomId_t> > bondPairIds_t;
    914
    1015// i.e. there is an integer with variable name Z that can be found in
     
    1924#undef paramvalids
    2025
    21 #define statetypes (atomId_t)(atomId_t)
    22 #define statereferences (firstId)(secondId)
     26#define statetypes (bondPairIds_t)
     27#define statereferences (bondPairIds)
    2328
    2429// some defines for all the names, you may use ACTION, STATE and PARAMS
     
    2732#define MENUPOSITION 2
    2833#define ACTIONNAME Remove
    29 #define TOKEN "remove-bond"
     34#define TOKEN "remove-bonds"
    3035
    3136// finally the information stored in the ActionTrait specialization
    32 #define DESCRIPTION "remove the bond in between two selected atoms"
     37#define DESCRIPTION "remove all  bonds present between selected atoms"
    3338#undef SHORTFORM
  • tests/regression/Bond/Add/testsuite-bond-add.at

    r2fcef3 r88afc9  
    1919
    2020AT_SETUP([Bond - adding bond])
    21 AT_KEYWORDS([bond add-bond])
     21AT_KEYWORDS([bond add-bonds])
    2222file=test.pdb
    2323AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Bond/Add/pre/$file $file], 0, [ignore], [ignore])
    2424AT_CHECK([chmod +w $file], 0, [ignore], [ignore])
    25 AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --add-bond], 0, [ignore], [ignore])
    26 AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Add/post/test.pdb], 0, [ignore], [ignore])
     25AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --add-bonds], 0, [ignore], [ignore])
     26AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Add/post/$file], 0, [ignore], [ignore])
    2727AT_CLEANUP
    2828
    2929
    3030AT_SETUP([Bond - adding bond with Undo])
    31 AT_KEYWORDS([bond add-bond undo])
     31AT_KEYWORDS([bond add-bonds undo])
    3232file=test.pdb
    3333AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Bond/Add/pre/$file $file], 0, [ignore], [ignore])
    3434AT_CHECK([chmod +w $file], 0, [ignore], [ignore])
    35 AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --add-bond --undo], 0, [ignore], [ignore])
    36 AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Add/pre/test.pdb], 0, [ignore], [ignore])
     35AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --add-bonds --undo], 0, [ignore], [ignore])
     36AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Add/pre/$file], 0, [ignore], [ignore])
    3737AT_CLEANUP
    3838
    3939
    4040AT_SETUP([Bond - adding bond with Redo])
    41 AT_KEYWORDS([bond add-bond redo])
     41AT_KEYWORDS([bond add-bonds redo])
    4242file=test.pdb
    4343AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Bond/Add/pre/$file $file], 0, [ignore], [ignore])
    4444AT_CHECK([chmod +w $file], 0, [ignore], [ignore])
    45 AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --add-bond --undo --redo], 0, [ignore], [ignore])
    46 AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Add/post/test.pdb], 0, [ignore], [ignore])
     45AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --add-bonds --undo --redo], 0, [ignore], [ignore])
     46AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Add/post/$file], 0, [ignore], [ignore])
    4747AT_CLEANUP
  • tests/regression/Bond/Remove/testsuite-bond-remove.at

    r2fcef3 r88afc9  
    1919
    2020AT_SETUP([Bond - removing bond])
    21 AT_KEYWORDS([bond remove-bond])
     21AT_KEYWORDS([bond remove-bonds])
    2222file=test.pdb
    2323AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Bond/Remove/pre/$file $file], 0, [ignore], [ignore])
    2424AT_CHECK([chmod +w $file], 0, [ignore], [ignore])
    25 AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --remove-bond], 0, [ignore], [ignore])
    26 AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Remove/post/test.pdb], 0, [ignore], [ignore])
     25AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --remove-bonds], 0, [ignore], [ignore])
     26AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Remove/post/$file], 0, [ignore], [ignore])
    2727AT_CLEANUP
    2828
    2929
    3030AT_SETUP([Bond - removing bond with Undo])
    31 AT_KEYWORDS([bond remove-bond undo])
     31AT_KEYWORDS([bond remove-bonds undo])
    3232file=test.pdb
    3333AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Bond/Remove/pre/$file $file], 0, [ignore], [ignore])
    3434AT_CHECK([chmod +w $file], 0, [ignore], [ignore])
    35 AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --remove-bond --undo], 0, [ignore], [ignore])
    36 AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Remove/pre/test.pdb], 0, [ignore], [ignore])
     35AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --remove-bonds --undo], 0, [ignore], [ignore])
     36AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Remove/pre/$file], 0, [ignore], [ignore])
    3737AT_CLEANUP
    3838
    3939
    4040AT_SETUP([Bond - removing bond with Redo])
    41 AT_KEYWORDS([bond remove-bond redo])
     41AT_KEYWORDS([bond remove-bonds redo])
    4242file=test.pdb
    4343AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Bond/Remove/pre/$file $file], 0, [ignore], [ignore])
    4444AT_CHECK([chmod +w $file], 0, [ignore], [ignore])
    45 AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --remove-bond --undo --redo], 0, [ignore], [ignore])
    46 AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Remove/post/test.pdb], 0, [ignore], [ignore])
     45AT_CHECK([../../molecuilder -i $file -o pdb --select-atom-by-id 0 1 --remove-bonds --undo --redo], 0, [ignore], [ignore])
     46AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Bond/Remove/post/$file], 0, [ignore], [ignore])
    4747AT_CLEANUP
  • tests/regression/Bond/testsuite-bond.at

    r2fcef3 r88afc9  
    2020# add bond
    2121m4_include([Bond/Add/testsuite-bond-add.at])
     22m4_include([Bond/Add/testsuite-bond-add_multiple.at])
    2223
    2324# remove bond
    2425m4_include([Bond/Remove/testsuite-bond-remove.at])
     26m4_include([Bond/Remove/testsuite-bond-remove_multiple.at])
  • tests/regression/Makefile.am

    r2fcef3 r88afc9  
    4646        $(srcdir)/Bond/testsuite-bond.at \
    4747        $(srcdir)/Bond/Add/testsuite-bond-add.at \
     48        $(srcdir)/Bond/Add/testsuite-bond-add_multiple.at \
    4849        $(srcdir)/Bond/Remove/testsuite-bond-remove.at \
     50        $(srcdir)/Bond/Remove/testsuite-bond-remove_multiple.at \
    4951        $(srcdir)/Analysis/testsuite-analysis.at \
    5052        $(srcdir)/Analysis/DipoleAngularCorrelation/testsuite-analysis-dipole-angular-correlation.at \
Note: See TracChangeset for help on using the changeset viewer.