Re: [COOT] Merge

2022-03-14 Thread Joel Tyndall
Please ignore this... found in under Edit

From: Mailing list for users of COOT Crystallographic Software 
 On Behalf Of Joel Tyndall
Sent: Tuesday, 15 March 2022 2:39 PM
To: COOT@JISCMAIL.AC.UK
Subject: Merge

Hi folks,

I cant find Merge...

Its not under the Calculate menu as it states in the pdf online...

“5.28 Merge Molecules This dialog can be found under “Calculate” in the main 
menubar.”

I can work around... but would be handy to know where its gone

Using Coot 0.9.4 via phenix (1.20)

J

Joel Tyndall | BSc(Hons) PhD

Associate Professor in Medicinal Chemistry
School of Pharmacy | He Rau Kawakawa
University of Otago | Te Whare Wānanga o Otāgo
PO Box 56 9054
Dunedin | Ōtepoti
New Zealand | Aotearoa
Ph: 64 3 479 7293
Skype: jtyndall
Website | 
pharmacy.otago.ac.nz





To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


[COOT] Merge

2022-03-14 Thread Joel Tyndall
Hi folks,

I cant find Merge...

Its not under the Calculate menu as it states in the pdf online...

“5.28 Merge Molecules This dialog can be found under “Calculate” in the main 
menubar.”

I can work around... but would be handy to know where its gone

Using Coot 0.9.4 via phenix (1.20)

J

Joel Tyndall | BSc(Hons) PhD

Associate Professor in Medicinal Chemistry
School of Pharmacy | He Rau Kawakawa
University of Otago | Te Whare Wānanga o Otāgo
PO Box 56 9054
Dunedin | Ōtepoti
New Zealand | Aotearoa
Ph: 64 3 479 7293
Skype: jtyndall
Website | pharmacy.otago.ac.nz





To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [COOT] Merge molecules scripting function

2014-04-03 Thread Oliver Clarke
The last function I posted didn’t work optimally - when merge_molecules is 
called, imol_daughter is undisplayed, but imol_ref is not updated straight away 
(which is a little confusing as it looks like you’ve deleted a mol rather than 
merged) - adding a toggle_display step fixes that, as below:

def merge_fragments():
  def merge_2_fragments(res1,res2):
mol_daughter=[res2[1]]
mol_ref=res1[1]
merge_molecules(mol_daughter,mol_ref)
toggle_display_mol(mol_ref)
toggle_display_mol(mol_ref)
  user_defined_click(2,merge_2_fragments)
add_simple_coot_menu_menuitem(menu, "Merge two mols (click two)", lambda func: 
merge_fragments())

On Apr 3, 2014, at 7:49 AM, Oliver Clarke  wrote:

> I knew that I was missing something obvious. Thanks Paul. Although as it 
> turns out, in Python the arguments are switched around (the first one is a 
> list and the second one is imol_ref).
> 
> Thanks!
> 
> Then, for the record, the function that I wanted to write goes something like 
> this:
> 
> def merge_fragments():
>  def merge_2_fragments(res1,res2):
>mol_daughter=[res2[1]]
>mol_ref=res1[1]
>merge_molecules(mol_daughter,mol_ref)
>  user_defined_click(2,merge_2_fragments)
> add_simple_coot_menu_menuitem(menu, "Merge two fragments (click two 
> fragments)", lambda func: merge_fragments())
> 
> Oliver.
> On Apr 3, 2014, at 5:04 AM, Paul Emsley  wrote:
> 
>> On 03/04/14 04:45, Oliver Clarke wrote:
>>> Hi all,
>>> 
>>> Is the functionality of ‘Calculate-->Merge Molecules’ available from the 
>>> scripting interface?
>> 
>> Yes.
>>> 
>>> I couldn’t find it in the manual. There is a function named 
>>> merge_molecules, but I don’t know what arguments it takes and it does not 
>>> do what I would expect - I’d like it to take two mol_ids and merge the 
>>> second one with the first, but that does not seem to be the case.
>> 
>> Recall that you can merge many molecules with a "first" molecule, then 
>> you're golden.
>> 
>> merge_molecules(imol_ref, [imol_daughter])
>> 
>> Although not written in python, I believe that the documentation hints that 
>> the second argument is a list of molecule numbers.
>> 
>>> 
>>> I’d like this function so I can write a little shortcut that will allow me 
>>> to click on two fragments and join them, rather than having to scroll 
>>> through the list of mol_ids of various newly placed helices etc.
>>> 
>>> I guess I could use replace_fragment if I add a dummy atom to the first 
>>> molecule and then replace it with the second -
>> 
>> Yikes! :-)
>> 
>> HTH,
>> 
>> Paul.
>> 
> 


Re: [COOT] Merge molecules scripting function

2014-04-03 Thread Oliver Clarke
I knew that I was missing something obvious. Thanks Paul. Although as it turns 
out, in Python the arguments are switched around (the first one is a list and 
the second one is imol_ref).

Thanks!

Then, for the record, the function that I wanted to write goes something like 
this:

def merge_fragments():
  def merge_2_fragments(res1,res2):
mol_daughter=[res2[1]]
mol_ref=res1[1]
merge_molecules(mol_daughter,mol_ref)
  user_defined_click(2,merge_2_fragments)
add_simple_coot_menu_menuitem(menu, "Merge two fragments (click two 
fragments)", lambda func: merge_fragments())

Oliver.
On Apr 3, 2014, at 5:04 AM, Paul Emsley  wrote:

> On 03/04/14 04:45, Oliver Clarke wrote:
>> Hi all,
>> 
>> Is the functionality of ‘Calculate-->Merge Molecules’ available from the 
>> scripting interface?
> 
> Yes.
>> 
>> I couldn’t find it in the manual. There is a function named merge_molecules, 
>> but I don’t know what arguments it takes and it does not do what I would 
>> expect - I’d like it to take two mol_ids and merge the second one with the 
>> first, but that does not seem to be the case.
> 
> Recall that you can merge many molecules with a "first" molecule, then you're 
> golden.
> 
> merge_molecules(imol_ref, [imol_daughter])
> 
> Although not written in python, I believe that the documentation hints that 
> the second argument is a list of molecule numbers.
> 
>> 
>> I’d like this function so I can write a little shortcut that will allow me 
>> to click on two fragments and join them, rather than having to scroll 
>> through the list of mol_ids of various newly placed helices etc.
>> 
>> I guess I could use replace_fragment if I add a dummy atom to the first 
>> molecule and then replace it with the second -
> 
> Yikes! :-)
> 
> HTH,
> 
> Paul.
> 


Re: [COOT] Merge molecules scripting function

2014-04-03 Thread Paul Emsley

On 03/04/14 04:45, Oliver Clarke wrote:

Hi all,

Is the functionality of ‘Calculate-->Merge Molecules’ available from the 
scripting interface?


Yes.


I couldn’t find it in the manual. There is a function named merge_molecules, 
but I don’t know what arguments it takes and it does not do what I would expect 
- I’d like it to take two mol_ids and merge the second one with the first, but 
that does not seem to be the case.


Recall that you can merge many molecules with a "first" molecule, then 
you're golden.


merge_molecules(imol_ref, [imol_daughter])

Although not written in python, I believe that the documentation hints 
that the second argument is a list of molecule numbers.




I’d like this function so I can write a little shortcut that will allow me to 
click on two fragments and join them, rather than having to scroll through the 
list of mol_ids of various newly placed helices etc.

I guess I could use replace_fragment if I add a dummy atom to the first 
molecule and then replace it with the second -


Yikes! :-)

HTH,

Paul.


[COOT] Merge molecules scripting function

2014-04-02 Thread Oliver Clarke
Hi all,

Is the functionality of ‘Calculate-->Merge Molecules’ available from the 
scripting interface? 

I couldn’t find it in the manual. There is a function named merge_molecules, 
but I don’t know what arguments it takes and it does not do what I would expect 
- I’d like it to take two mol_ids and merge the second one with the first, but 
that does not seem to be the case.

I’d like this function so I can write a little shortcut that will allow me to 
click on two fragments and join them, rather than having to scroll through the 
list of mol_ids of various newly placed helices etc.

I guess I could use replace_fragment if I add a dummy atom to the first 
molecule and then replace it with the second - that might work, but there is 
probably a simpler solution that I’m missing.

Many thanks,
Oliver.

Re: [COOT] merge chains?

2010-07-14 Thread Mirek Cygler
Thanks Carsten, that worked.
Mirek

> -Original Message-
> From: Schubert, Carsten [PRDUS] [mailto:cschu...@its.jnj.com]
> Sent: Wednesday, July 14, 2010 1:16 PM
> To: mi...@bri.nrc.ca; COOT@JISCMAIL.AC.UK
> Subject: RE: [COOT] merge chains?
> 
> Mirek,
> 
> coot's merging algorithm is a bit over-cautious in these cases. Try
> using "Calculate->Change Chain ID" and define the residue ranges for
> the merge, that should help.
> 
> HTH
> 
>   Carsten
> 
> 
> 
> > -Original Message-
> > From: Mailing list for users of COOT Crystallographic Software
> > [mailto:c...@jiscmail.ac.uk] On Behalf Of Mirek Cygler
> > Sent: Wednesday, July 14, 2010 1:03 PM
> > To: COOT@JISCMAIL.AC.UK
> > Subject: [COOT] merge chains?
> >
> > Hi,
> > I would like to combine two chains into one inside Coot. The
> > residue
> > numbers do not overlap. I cannot find the command to do it. Renaming
> > the
> > second chain does not work, Coot tells me that I alredy have a chain
> of
> > that
> > name.
> > Thanks for your help,
> >
> >     Mirek


Re: [COOT] merge chains?

2010-07-14 Thread Schubert, Carsten [PRDUS]
Mirek,

coot's merging algorithm is a bit over-cautious in these cases. Try using 
"Calculate->Change Chain ID" and define the residue ranges for the merge, that 
should help.

HTH

Carsten



> -Original Message-
> From: Mailing list for users of COOT Crystallographic Software
> [mailto:c...@jiscmail.ac.uk] On Behalf Of Mirek Cygler
> Sent: Wednesday, July 14, 2010 1:03 PM
> To: COOT@JISCMAIL.AC.UK
> Subject: [COOT] merge chains?
> 
> Hi,
>   I would like to combine two chains into one inside Coot. The
> residue
> numbers do not overlap. I cannot find the command to do it. Renaming
> the
> second chain does not work, Coot tells me that I alredy have a chain of
> that
> name.
>   Thanks for your help,
> 
>     Mirek


[COOT] merge chains?

2010-07-14 Thread Mirek Cygler
Hi,
I would like to combine two chains into one inside Coot. The residue
numbers do not overlap. I cannot find the command to do it. Renaming the
second chain does not work, Coot tells me that I alredy have a chain of that
name.
Thanks for your help,

    Mirek


Re: [COOT] merge water chains

2009-05-07 Thread Paul Emsley

> From: Christian Roth 
>
>> Hi all,
>>
>> I am not sure but If I remember correctly Bernhard mentioned on the
>> last CCP4
>> study weekend in Nottingham that Coot is able to merge the
>> different water
>> chains, generated through repeated refinement runs, in one. If this
>> function
>> exist, how can I use it?
>>
>> Thanks in advance for your help.

Bernhard Lohkamp wrote:

Since I supposedly mentioned this (and I have made a script)...

there is a python function to do so:

use
merge_solvent_chains(imol)
or 
merge_water_chains(imol)


alternatively you have to do it by hand, i.e. using Calculate->Change
Chain ID (use residue range).

B

P.S. no corresponding scheme function there yet.



As of revision 1980, there is a scheme version.  Both this and the 
python version renumber the waters as they merge them.


Paul.


Re: [COOT] merge water chains

2009-05-06 Thread Bernhard Lohkamp
Since I supposedly mentioned this (and I have made a script)...

there is a python function to do so:

use
merge_solvent_chains(imol)
or 
merge_water_chains(imol)

alternatively you have to do it by hand, i.e. using Calculate->Change
Chain ID (use residue range).

B

P.S. no corresponding scheme function there yet.

***

Dr. Bernhard Lohkamp
Assistant Professor
Div. Molecular Structural Biology
Dept. of Medical Biochemistry and Biophysics (MBB)
Karolinska Institutet
S-17177 Stockholm
Sweden

phone: (+46) 08-52487673
fax:   (+46) 08-327626
email: bernhard.lohk...@ki.se

- Original Message -
From: Christian Roth 
Date: Tuesday, May 5, 2009 7:05 pm
Subject: [COOT] merge water chains
To: COOT@JISCMAIL.AC.UK

> Hi all,
> 
> I am not sure but If I remember correctly Bernhard mentioned on the 
> last CCP4 
> study weekend in Nottingham that Coot is able to merge the 
> different water 
> chains, generated through repeated refinement runs, in one. If this 
> function 
> exist, how can I use it?
> 
> Thanks in advance for your help.
> 
> Christian
> -- 
> Christian Roth
> Institut für Bioanalytische Chemie
> Biotechnologisch-Biomedizinisches Zentrum
> Fakultät für Chemie und Mineralogie
> Universität Leipzig
> Deutscher Platz 5
> 04103 Leipzig
> Telefon: +49 (0)341 97 31316
> Fax: +49 (0)341 97 31319
>


[COOT] merge water chains

2009-05-05 Thread Christian Roth
Hi all,

I am not sure but If I remember correctly Bernhard mentioned on the last CCP4 
study weekend in Nottingham that Coot is able to merge the different water 
chains, generated through repeated refinement runs, in one. If this function 
exist, how can I use it?

Thanks in advance for your help.

Christian
-- 
Christian Roth
Institut für Bioanalytische Chemie
Biotechnologisch-Biomedizinisches Zentrum
Fakultät für Chemie und Mineralogie
Universität Leipzig
Deutscher Platz 5
04103 Leipzig
Telefon: +49 (0)341 97 31316
Fax: +49 (0)341 97 31319


Re: [COOT] merge symmetry related atoms in coot

2008-08-11 Thread Eleanor Dodson

This is tricky I find ..

You can use the NCS ghost to fit the bits of A you like over B, then 
work out what bits of B you want to shift into A.


There are tools to rename that bit of B to A and if necessary renumber 
it as well..
Then output the renamed file and you will probably have to edit it by 
hand to get the fragments in the right order..


Eleanor


jenny flower wrote:

Hello

I have a partial model with 4 chains,  but some part of A chain is in B
chain, can I merge the symmetry  related atoms to make a right A chain?

thanks

Qing Chen

  


Re: [COOT] merge symmetry related atoms in coot

2008-08-07 Thread Mark Brooks
Hi,
This is a good question, and I've been trying to do this myself.

My solution is somewhat crude: take two input PDB files, one containing the
majority that you want to keep, and one which acts as a mask to delete the
atoms which overlap from the two structures.

How do you define the overlapping region?  For me, I just calculated a box
around the masking pdb file, but it could be more elegantly done with a
proper mask.

Here is my solution, written in ruby (I haven't tried  scheme yet so I can't
do it in COOT). The script outputs the 'intersecting' residues as well as
the 'remaining' residues.

If your residues are symmetry related Jenny, you'll have to use Coot's
"File>Save Symmetry Coordinates" menu item to save the truly overlapping
coordinates of chains A and B, before using this script. It uses ruby and
bioruby ("apt-get install ruby-1.8 libbio-ruby" under Debian/Ubuntu).

If anyone has an easier or more elegant solution, it would be useful!

Mark

delete_masked.rb
#!/usr/bin/ruby1.8
# == delete_masked.rb
#
# == Synopsis
#
# Script to delete atoms masked by atoms
# from another superposed PDB file.
#
# A box around the atoms from the maskfile is
# used to delete residues from the second file.
#
# == Usage
#
#  delete_masked.rb -m  -c  -o [outfile]
#
# -h, --help:   Show help (Optional)
#
# --maskfile, -mName of the input PDB file to be used for the coordinate
mask (Required)
#
# --compfile, -cName of the file to be compared to the maskfile
(Required)
#
# --outfile, -oName of the output file(Optional)
# Default: masked.pdb

require 'getoptlong'
require 'bio/db/pdb'
require 'rdoc/usage'

if  (ARGV.length != 1) && (ARGV.length != 4) && (ARGV.length != 6)
 puts ARGV.length.to_s + " arguments"
 puts "Incorrect argument(s)"
  RDoc::usage(-1)
end

opts = GetoptLong.new(
   ['--maskfile',   '-m',
GetoptLong::REQUIRED_ARGUMENT],
   ['--compfile',   '-c',
GetoptLong::REQUIRED_ARGUMENT],
   ['--outfile','-o',   GetoptLong::OPTIONAL_ARGUMENT],
   ['--help',   '-h',   GetoptLong::NO_ARGUMENT]
   )

maskfile = nil
compfile = nil
chain = "A"
first = 1
last = 10
opts.each do |opt, arg|
  case opt
when '--help'
  RDoc::usage
when '--maskfile'
  maskfile = arg.to_s
when '--outfile'
  outfile = arg.to_s
when '--compfile'
  compfile = arg.to_s
  end
end
if (first != 1)
firstname =  "-" + first.to_s
else
firstname = ""
end
if (last != 10)
lastname  =  "-" + last.to_s
else
lastname = ""
end
maskfilebase = maskfile.gsub('.pdb','')
outfile1 ||= maskfilebase + "-deleted" ".pdb"
outfile2 ||= maskfilebase + "-masked" ".pdb"

file1 = File.new(maskfile).gets(nil)
file2 = File.new(compfile).gets(nil)
structure1 = Bio::PDB.new(file1)
xmin = 1.0
ymin = 1.0
zmin = 1.0
xmax = -1.0
ymax = -1.0
zmax = -1.0
structure1.each_atom do |atom|
  xyz = atom.xyz
  if xyz.x < xmin
xmin = xyz.x
  end
  if xyz.y < ymin
ymin = xyz.y
  end
  if xyz.z < zmin
zmin = xyz.z
  end
  if xyz.x > xmax
xmax = xyz.x
  end
  if xyz.y > ymax
ymax = xyz.y
  end
  if xyz.z > zmax
zmax = xyz.z
  end
end
deleted_atom_counter = 0
saved_atom_counter = 0
puts "Atoms are being deleted from this box:"
puts "X axis coordinates from min:" + xmin.to_s + " to max: " + xmax.to_s +
"\n"
puts "Y axis coordinates from min:" + ymin.to_s + " to max: " + ymax.to_s +
"\n"
puts "Z axis coordiantes from min:" + zmin.to_s + " to max: " + zmax.to_s +
"\n"
#Compare structure2
structure2 = Bio::PDB.new(file2)
deleted_fragment = ""
saved_fragment = ""
structure2.each_atom do |atom2|
xyz2 = atom2.xyz
  if xyz2.x > xmin && xyz2.x < xmax && xyz2.y > ymin && xyz2.y < ymax &&
xyz2.z > zmin && xyz2.z < zmax
deleted_fragment << atom2.to_s
deleted_atom_counter += 1
  else
saved_fragment << atom2.to_s
saved_atom_counter += 1
  end
end
outFh1 = File.new(outfile1, 'w')
puts "Writing #{deleted_atom_counter} deleted atoms to: #{outfile1}"
outFh1.puts deleted_fragment
outFh1.close
outFh2 = File.new(outfile2, 'w')
puts "Writing #{saved_atom_counter} masked atoms to: #{outfile2}"
outFh2.puts saved_fragment
outFh2.close
=end of file===


2008/8/7 jenny flower <[EMAIL PROTECTED]>

> Hello
>
> I have a partial model with 4 chains,  but some part of A chain is in B
> chain, can I merge the symmetry  related atoms to make a right A chain?
>
> thanks
>
> Qing Chen
>



-- 
Mark BROOKS
Telephone: 0169157968
Fax: 0169853715
Institut de Biochmie et de Biophysique Moleculaire et Cellulaire
UMR8619 - Bât 430 - Université de Paris-Sud
91405 Orsay CEDEX
Skype: markabrooks


[COOT] merge symmetry related atoms in coot

2008-08-07 Thread jenny flower
Hello

I have a partial model with 4 chains,  but some part of A chain is in B
chain, can I merge the symmetry  related atoms to make a right A chain?

thanks

Qing Chen