Analysis of ligand SASA.

def analyse_ligand_sasa(self):
		"""Analysis of ligand SASA."""
		i=0
		start = timer()
		if self.trajectory == []:
			self.trajectory = [self.topology_data.universe.filename]
		try:
			for traj in self.trajectory:
				new_traj = mdtraj.load(traj,top=self.topology_data.universe.filename)
				#Analyse only non-H ligand
				ligand_slice = new_traj.atom_slice(atom_indices=self.topology_data.universe.ligand_noH.ids)

				self.sasa = mdtraj.shrake_rupley(ligand_slice)
				self.atom_sasa[i]=self.assign_per_atom_sasa()
				i+=1
			self.total_sasa = self.get_total_per_atom_sasa()
		except KeyError as e:
			print "WARNING: SASA analysis cannot be performed due to incorrect atom names in"
			print "the topology ", e

		print "SASA: "+str(timer()-start)