show me where to start
Mon, 01/16/2012 - 17:26
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)
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.