Can't seem to undo delete_bonds

Hi everyone,

I am having trouble with getting deleted bonds to turn back on again after minimization. Here is the log from the delete_bonds commands:

delete_bonds all bond 3
960 total bonds, 870 turned on, 90 turned off
680 total angles, 680 turned on, 0 turned off
0 total dihedrals, 0 turned on, 0 turned off
0 total impropers, 0 turned on, 0 turned off

.
.

…minimize…
.
.

#undo delete_bonds
delete_bonds all bond 3 undo
960 total bonds, 870 turned on, 90 turned off
680 total angles, 680 turned on, 0 turned off
0 total dihedrals, 0 turned on, 0 turned off
0 total impropers, 0 turned on, 0 turned off

As you can see from the log, the bonds are still turned off (the 90 bonds) after I’ve undone the original delete_ bonds command. Any ideas what might be wrong and how to fix this?

Thanks,
Cam Tran

Hi everyone,

I am having trouble with getting deleted bonds to turn back on again after
minimization. Here is the log from the delete_bonds commands:

delete_bonds all bond 3
  960 total bonds, 870 turned on, 90 turned off
  680 total angles, 680 turned on, 0 turned off
  0 total dihedrals, 0 turned on, 0 turned off
  0 total impropers, 0 turned on, 0 turned off
.
.
...minimize....
.
.

#undo delete_bonds
delete_bonds all bond 3 undo
  960 total bonds, 870 turned on, 90 turned off
  680 total angles, 680 turned on, 0 turned off
  0 total dihedrals, 0 turned on, 0 turned off
  0 total impropers, 0 turned on, 0 turned off

As you can see from the log, the bonds are still turned off (the 90 bonds)
after I've undone the original delete_ bonds command. Any ideas what might
be wrong and how to fix this?

hard to say, if this is a logic bug or a desired feature, but your
second command is not correct with the current implementation.

since disabled bonds have a negative type, you would have to use the command:

delete_bonds all bond -3 undo

to do what you want. the type 3 bonds simply don't match.

axel.

hard to say, if this is a logic bug or a desired feature, but your
second command is not correct with the current implementation.
since disabled bonds have a negative type, you would have to use the command:
delete_bonds all bond -3 undo
to do what you want. the type 3 bonds simply don’t match.

well, that’s counter-intuitive. Not sure why we
did it that way.

I just changed delete bonds, to always take positive types as
an argument, but use the “undo” keyword to mean
flip a negative to a positive for those types.

I also added a wildcard option to the type arg,

so you can specify 1*3 if you want to act on all

interactions of type = 1,2,3. Similar to the pair_coeff

command.

Will be in the next patch.

Steve

Thank you Steve and Axel.

I was able to figure it out after careful reading of the doc page, but yes, it was a bit counter-intuitive. I appreciate both of your help and input. The wildcard option does save me some time as well.

Thanks again,

Cam

hard to say, if this is a logic bug or a desired feature, but your
second command is not correct with the current implementation.
since disabled bonds have a negative type, you would have to use the command:
delete_bonds all bond -3 undo
to do what you want. the type 3 bonds simply don’t match.

well, that’s counter-intuitive. Not sure why we
did it that way.

I just changed delete bonds, to always take positive types as
an argument, but use the “undo” keyword to mean
flip a negative to a positive for those types.

I also added a wildcard option to the type arg,

so you can specify 1*3 if you want to act on all

interactions of type = 1,2,3. Similar to the pair_coeff

command.

Will be in the next patch.

Steve