Dear All,
I am using Forcite modules and I wrote a code to calculate mechanical properties of some amorphous materials. I need to have the total atomic volume during deformation. Volume can be calculated by using Material Studio Visualizer through “Atom volumes & surfaces” tool bar.
I tried to solve my problem by using some commands such as “\\\$doc->Lattice3D->CellVolume;” “\\\$doc->CalculateConnollyField;” , but I couldn’t do that.
It will be appreciated if anybody has suggestion.
Kind Regards
Saeed

Hi Saeed,
Here are some ideas:
my $Field = $doc->CalculateSolventField;
my $vdwSurface = $Field->CreateIsosurface([IsoValue => 0]);
my $Volume = $vdwSurface->EnclosedVolume;
print "Solvent vdw volume $Volume\n";
my $Field = Tools->AtomVolumesSurfaces->Solvent->Calculate($doc,Settings(MaxSolventRadius => 1));
my $vdwSurface = $Field->CreateIsosurface([IsoValue => 0]);
my $Volume = $vdwSurface->EnclosedVolume;
print "Solvent vdw volume (1A probe) $Volume\n";
my $Field = $doc->CalculateConnollyField;
my $vdwSurface = $Field->CreateIsosurface([IsoValue => 0]);
my $Volume = $vdwSurface->EnclosedVolume;
print "Connolly vdw volume $Volume\n";
my $vol=0;
foreach my $atom (@{$doc->UnitCell->Atoms})
{
$vol += (4/3)*3.14159*($atom->VDWRadius)**3;
}
print "Sum of vdw atom volumes $vol\n";
Best,
/Jason
Dear Jason,
Many thanks for the reply,
I tried these methods before, but answers are different in comparison with the volume that I got from MS visualizer. All of them are more than that. I used ConnollyRadius=>0,MaxSolventRadius=>0 , but still volume is different. I can send you the script file and model.
Regards
Saeed
,
Hi Saeed,
This problem will be fixed in the next release. But for now you can use the following workaround:
my $doc = Documents->New("atom.xsd");
$doc->CreateAtom("C",Point(X=>0,Y=>0,Z=>0));
my $field = $doc->CalculateSolventField;
my $surface = $field->CreateIsosurface([IsoValue => 0]);
$surface->HasFlippedNormals = "No";
print "Surf vol " . $surface->EnclosedVolume . "\n";
print "Surf area " . $surface->SurfaceArea . "\n";
It should produce the same volume as the visualizer. The problem involves only the volume. We found that the surface area is correct, but the volume was accidentally being inverted. So it gives you the volume of the field bounding box minus the volume enclosed by the surface.
Thanks,
/Jason