From a796e7259b840eb4192253401424cac4dc6fc82b Mon Sep 17 00:00:00 2001 From: toshinagata1964 Date: Sat, 26 Nov 2011 16:15:00 +0000 Subject: [PATCH] Selection after ring fusion by 'double-click and type-in' now includes all atoms in the newly formed ring. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@156 a2be9bc6-48de-4e38-9406-05402d4bc13c --- Scripts/molecule.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scripts/molecule.rb b/Scripts/molecule.rb index 708f4a4..61c7c3d 100755 --- a/Scripts/molecule.rb +++ b/Scripts/molecule.rb @@ -803,12 +803,16 @@ class Molecule # Add group, create bond, and remove extra atoms n = natoms add(mol2) + newsel = sel + IntGroup[n..n + mol2.natoms - 1] create_bonds(seq[0], c1 + n, seq[-1], c2 + n) frag = frag.offset(n) frag.add(base_h[0]) if base_h[0] frag.add(base_h[1]) if base_h[1] # puts "frag = #{frag.inspect}" + newsel -= frag + newsel = newsel.deconvolute(atom_group - frag) # Renumber by skipping the atoms in removed fragment remove(frag) + self.selection = newsel return self end -- 2.11.0