show me where to start

2 replies [Last post]
baikal23
User offline. Last seen 9 years 18 weeks ago. Offline
Joined: 01/16/2012
Posts:

Hi - I love your app and would like to extend it to incorporate more small molecules where the user can enter XYZ coordinates for the atoms. If you point me to the right place to hook in, I'll see what I can do to add this functionality. I've been doing app programming for a while (as a hobby, like you) and would like to work on this. So if you can show me where to feed this info into your SQL database, theat would be a help (I haven't done SQL myself)

Brad Larson
Brad Larson's picture
User offline. Last seen 4 years 22 weeks ago. Offline
Joined: 05/14/2008
Posts:

If you'd like to attempt to add XYZ files as a supported file format, you'll want to look at the SLSMolecule+PDB(.m and .h) and the SLSMolecule+SDF(.m and .h) files. These define two categories on SLSMolecule that contain the routines used to load PDB and SDF format files. You can look at how those parse the two file formats and insert the correct atoms and bonds into the database. The SDF one is simpler and probably closer to what you'd need for this.

Once you have the category complete, you'll need to edit the -initWithFilename: method on SLSMolecule to support the .XYZ file extension, and you might need to tweak my handling of iTunes file sharing added files so that .xyz files are recognized via that. I don't believe the code I have up on the site even has .sdf file support fixed in that regard.

baikal23
User offline. Last seen 9 years 18 weeks ago. Offline
Joined: 01/16/2012
Posts:

Thanks, Brad. I'll give it a try & let you know how it goes

Syndicate content