[Biojava-l] Superimposing structure pieces
Daniel Asarnow
dasarnow at gmail.com
Tue Nov 2 07:25:42 UTC 2010
I'm working with the SEQRES numbering because my start and end indices
have been derived from sequence-based filters that employed the
complete chain sequences. I am currently using exception handling to
deal with missing density, etc. for now (adding a "continue;" in a
loop's catch block is very simple), but I assume this will turn out
slower than explicit logic after profiling. I'm also planning to
compare CA-only vs. other backbone and side-chain coords., thus using
the getAtom("CA") method over parsing only CAs from the beginning.
In this project the 'frame' of the structure alignments is enforced,
so there's no need for a real alignment algorithm...but I am planning
to use the CE and FATCAT methods in another program. Also, thanks for
pointing out my rotation error. I actually noticed it shortly after
my last email when my code returned RMSDs on the order of 10^6
Angstroms (for 10 CAs from consecutive residues)!
-da
On Sun, Oct 31, 2010 at 20:08, Andreas Prlic <andreas at sdsc.edu> wrote:
> Hi Daniel,
>
> couple of thoughts when I see this:
>
> - in case you have not seen this yet, take a look at docu on structure
> alignment: http://biojava.org/wiki/BioJava:CookBook:PDB:align
> - the direction of your rotations is wrong,the SVDSuperimposer gives
> you the operations to be applied on the second atom set.
> - there is some utility methods in StructureTools, that might come in
> handy. e.g.
> Atom[] ca1 = StructureTools.getAtomCAArray(structure1);
> Atom[] ca2 = StructureTools.getAtomCAArray(structure2);
>
> - any particular reason why you are working with SEQRES records? for
> the superposition it might be sufficient to work with the ATOM records
> only, which can give you a quicker parsing of the files, since you can
> turn off the alignment of ATOM and SEQRES. Having said that, there can
> be situations when you actually might want it, e.g. see
> SmithWaterman3Daligner, which does a sequence based structure
> alignment...
>
> hope that helps,
>
> Andreas
>
>
> On Sun, Oct 31, 2010 at 7:56 PM, Daniel Asarnow <dasarnow at gmail.com> wrote:
>> I've been trying to pull out pieces of protein chains and superimpose
>> them...my current code (as generic-ified code snips below) works, but
>> I wonder if it couldn't be faster.
>> Has anyone worked on similar methods? Any other advice?
>>
>> Best regards everyone,
>> da
>>
>> Getting residue CA's as Atom[]:
>>
>> for (int i; i < length; i++) {
>> someAtoms[i] = someChain.getSeqResGroup(start + i).getAtom("CA");
>> }
>>
>> Superimposing/aligning:
>>
>> SVDSuperimposer svds = new SVDSuperimposer(someAtoms1, someAtoms2);
>> Matrix rot = svds.getRotation();
>> Atom trans = svds.getTranslation();
>> for (int i = 0; i < length; i++) {
>> Calc.rotate(someAtoms1[i], rot);
>> Calc.shift(someAtoms1[i], trans);
>> }
>> SVDSuperimposer.getRmsd(someAtoms1, someAtoms2);
>> _______________________________________________
>> Biojava-l mailing list - Biojava-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biojava-l
>>
>
More information about the Biojava-l
mailing list