示例#1
0
文件: efp.c 项目: SahanGH/psi4public
EFP_EXPORT void
efp_shutdown(struct efp *efp)
{
	if (!efp)
		return;

	for (size_t i = 0; i < efp->n_frag; i++)
		free_frag(efp->frags + i);

	for (size_t i = 0; i < efp->n_lib; i++) {
		free_frag(efp->lib[i]);
		free(efp->lib[i]);
	}

	free(efp->frags);
	free(efp->lib);
	free(efp->grad);
	free(efp->ptc);
	free(efp->ptc_xyz);
	free(efp->ptc_grad);
	free(efp->indip);
	free(efp->indipconj);
	free(efp->ai_orbital_energies);
	free(efp->ai_dipole_integrals);
	efp_bvec_free(efp->skiplist);
	free(efp);
}
示例#2
0
文件: ip_frag.cpp 项目: olgk/libvma
void ip_frag_manager::destroy_frag_desc(ip_frag_desc_t *desc)
{
	struct ip_frag_hole_desc *phole, *pphole;

	// free holes
	phole = desc->hole_list;
	while (phole) {
		pphole = phole;
		phole = phole->next;
		free_hole_desc(pphole);
	}

	// free frags
	free_frag(desc->frag_list);
}